Private Sub Command1_Click() Dim aa As String Open "c:\1.txt" For Input As #1 Line Input #1, aa MsgBox aaEnd Sub
上面代码变量aa的值就是读取出来txt的数据。