一文本文件:DCTLCODE.INI
SH600348/SZ000968
SH600348/SH600395
SH600348/SH601101
SH600348/SZ000780
SH600348/SZ000933
SH600348/SZ000937
SH600348/SZ000983
SH600348/SZ002128
SH600348/SH600123
SH600348/SH600188
SH600348/SH600508
SH600348/SH600997
編了一個自定義函數GET_LINE(路徑正確的),為何返回總是空字符串
Function GET_LINE(Formula,ANLINENO)
'系統會在逐K線模式解釋公式時的每個周期都會調用此函數一遍,因此設計時應該注重程序的執行效率,不要重復的執行一些沒必要的代碼
tcfiledire=Application.AppPath+"\systemexch\"
tcfilename="DCTLCODE.ini"
tcfilepath=tcfiledire+tcfilename
Set fs = CreateObject("Scripting.FileSystemObject")
Set FSa = fs.OpenTextFile(tcfilepath)
tcline=FSa.readline
GET_LINE=tcline
End Function
是否不能返回字符串數據?只能返回數值
自定義函數目前只能返回數字無法返回字符串