cjl1=CDbl(powerwindow_TextBox1.Text)
cjl2=CDbl(powerwindow_TextBox2.Text)
hy =CDbl(powerwindow_TextBox6.Text)
Set History2 = marketdata.GetHistoryData(powerwindow_TextBox4,powerwindow_TextBox5,0)
TAmount2 = History2.Amount(History2.Count-2)/100000000
TAmount1 = History2.Amount(History2.Count-1)/100000000
d=TAmount2+TAmount1
Price1 = History2.Close(History2.Count-1)
CCL1 = History2.Openint(History2.Count-1)/100000000
CCL2 = History2.Openint(History2.Count-2)/100000000
CCLC = CCL1-CCL2
f=CCL1*Price1*hy
Msgbox powerwindow_TextBox1.Text
Msgbox TAmount1
Msgbox d
Msgbox cj1
Msgbox cj2
为什么 powerwindow_TextBox1.Text msgbox以后有数值
但是cjl1=CDbl(powerwindow_TextBox1.Text) msgbox cjl1就没有数值 而为空呢
肯定是数字
用 VarType 函数
看看返回的值。
msgbox vartype(powerwindow_TextBox1.Text)