Vbs China Stock Exchange Data Loader
Type StockType
    'a0 As Long  'Tag            "标示码"
    a1 As Long   'Date           "日期"'
    a2 As Long   'Start Price    "开盘价'
    a3 As Long   'Highest Price  "最高价"'
    a4 As Long   'Lowest Price   "最低价"'
    a5 As Long   'Close Price    "收盘价"'
    a6 As Single 'Trade Amount   "成交金额"'
    a7 As Long   'Trade Amount   "成交量"'
    a8 As Long   'Tag 0 or 65536 "标识"'
End Type

Sub btnLoad_click()

Dim file2     As Integer
  Dim b  As StockType
  Dim baseRow As Integer
  baseRow = 11 - 1

  Dim file1
  file1 = FreeFile
  Dim fileBase As String
  fileBase = "C:\usr\local\citic\zxzq\Vipdoc\sz\lday\"
  Open fileBase & "sz002218.day" For Binary Access Read As #file1
  i = 1

  Do While Not EOF(file1)
    Get #file1, , b
    Cells(i + baseRow, 1) = b.a1
    Cells(i + baseRow, 2) = b.a2
    Cells(i + baseRow, 3) = b.a3
    Cells(i + baseRow, 4) = b.a4
    Cells(i + baseRow, 5) = b.a5
    Cells(i + baseRow, 6) = b.a6
    Cells(i + baseRow, 7) = b.a7
    Cells(i + baseRow, 8) = b.a8

    i = i + 1
  Loop

  Close #file1

End Sub