Private Sub Command1_Click()
If Dir(App.Path & "\" & Text2.Text) = "" Then
MsgBox ("输入文件不存在")
Else
Open App.Path & "\" & Text2.Text For Input As 1
Command2.Enabled = True
End If
Command1.Enabled = False
End Sub
Private Sub Command2_Click()
Dim a As Integer, b As Integer, c As Integer
If EOF(1) = False Then
Input #1, a, b, c
Print "a=" & a & "b=" & b & "c=" & c
Else
Close #1
Command2.Enabled = False
Command1.Enabled = True
End If
End Sub
Private Sub Form_Load()
Command2.Enabled = False
End Sub
遇到逗号变赋值给另一个变量
变量用Val函数转换给变量