如果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
End Sub
如果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