马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
Type MyType
a1 As Long '标示码
a2 As Long '日期
a3 As Single '开盘价
a4 As Single '最高价
a5 As Single '最低价
a6 As Single '收盘价
a7 As Single '成交金额
a8 As Long '成交量
End Type
Sub 按钮1_Click()
Dim File2 As Integer
Dim b As MyType
File1 = FreeFile
Open "sh600000.day" For Binary Access Read As #File1
i = 1
Do While Not EOF(File1)
Get #File1, , b
Cells(i, 1) = b.a1
Cells(i, 2) = b.a2
Cells(i, 3) = b.a3
Cells(i, 4) = b.a4
Cells(i, 5) = b.a5
Cells(i, 6) = b.a6
Cells(i, 7) = b.a7
Cells(i, 8) = b.a8
i = i + 1
Loop
Close #File1
End Sub
------以上是我从网上找到的一段VBA代码,将其用于Excel中得出的结果有错误,希望得到老师的指点,下面是错误状态图片。---------------
[ 本帖最后由 炒股机师 于 2011-5-3 11:12 编辑 ] |