回覆列表
  • 1 # 滴逃逃

    如果TXT檔案是單行的話

    Open "c:\1.txt" For Binary As #1

    Text1.Text = Input(lof(1), 1)

    Close #1

    Dim a

    a = Split(Text1.Text)

    如果是多行要加迴圈

    Option Explicit

    Dim a$, n%, k%, c$(), d%

    Private Sub Form_Click()

    n = 0

    Open App.Path & "\temp.txt" For Input As #1

    Do Until EOF(1)

    n = n + 1

    Line Input #1, a

    ReDim c(n)

    d = Len(a)

    k = InStr(1, a, "=")

    c(n) = Right(a, (d - k + 1))

    Print "c(" & n & ")=" & c(n)

    Loop

    Close #1

    End Sub

  • 中秋節和大豐收的關聯?
  • 最近我的眼睛老是一早睡起來就腫,為什麼?