运行的时候总会 在 next i 的地方出现
编译器错我1025
expected end of statement。
请问是什么原因? 都是跟随 VBA 的语法,看不出问题。
function test( ticker, market, cycle, period )
dim a
dim d
set d = createobject("Stock.Array")
dim i
dim x
set History = marketdata.GetHistoryData( ticker, market,cycle )
for i = 0 to period - 1 step 1
x = History.close( History.count - i )
d.addback( x )
next i
end function
[此贴子已经被作者于2010-7-20 10:26:47编辑过]
纠正了 function 的错误。
在 macro 里面 call 这个test function 的时候出现
编译器错误 '429'
ActiveX component can't create object :'Stock.Array'
我的 sub 是
Sub testF()
a = test( 10 )
msgbox( a )
End Sub
****************************
sub test( period )
'set d = CreateObject("Stock.Array")
set MinuteData = marketdata.GetMinuteData( "CF01", "ZQ" )
dim d
Set d = CreateObject("Stock.Array")
dim i
dim x
set History = marketdata.GetHistoryData( ticker, market,cycle )
if MinuteData.count > period then
for i = 0 to period - 1 step 1
x = minutedata.newprice(i)
d.addback( x )
next
end if
test = d.forecast
end sub
谢谢了。
那说明你可能是没有正确的安装金字塔,建议用Setup重新安装
那说明你可能是没有正确的安装金字塔,建议用Setup重新安装
你是说要重装电脑吗?
要装中文系统?
能否说说具体这个 Stock array 为何会 影响到 ActiveX component 。
有没有其他办法绕过这个对象方法,同样达到求forecast或者接触array 的目的
谢谢
[此贴子已经被作者于2010-7-21 11:24:31编辑过]
你试试用ADMINISTRATOR登陆,并且INTERNET安全选项调到中低以下试试