VBA功能太慢 [英] VBA function too slow
本文介绍了VBA功能太慢的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
以下VBA函数在Excel中的计算速度非常慢.我有兴趣找到可以在C语言中为此提供插件的人.我愿意为此服务付费.
The following VBA function calculates very slowly in Excel. I am interested in finding someone who can provide an add-in for this in C. I am willing to pay for this service.
Function DRXL( A, B, Row)
'A and B are integers and row is the worksheet row number'
Set Lows = Range("Lows")
Set Highs = Range("Highs")
Set TR = Range("TR")
HH = 0
For n = A To B
Value1 = (Highs.Cells(Row) - Lows.Cells(Row - n)) / Sqr(n)
If Value1 > HH Then
HH = Value1
End If
Next
DRXL = HH / Application.Average(Range(TR.Cells(Row), TR.Cells(Row - 20)))
End Function
Thanks,
Peter Day
推荐答案
有一些关于CP的文章以您想要的方式使用addin.尝试阅读@:
的文章 使用C语言编写的Excel函数加载项 [使用.NET为Excel创建自动化加载项 [ http://support.microsoft.com/kb/178474 [
There are articles on CP that use addin the way you want. Try reading the articles @ :
Sample Excel Function Add-in in C[^]
Create an Automation Add-In for Excel using .NET[^]
and on MS @ http://support.microsoft.com/kb/178474[^]
这篇关于VBA功能太慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文