Private Sub Command1_Click()
x = "C:\Documents and Settings\stu\桌面\11.txt" '你要读取的TXT文件路径
Open x For Input As #1
Do While Not EOF(1)
Input #1, aa
Loop
Text1.Text = aa
End Sub
添加一个CommandDialog
dim a as string, inputdata as string
commanddialog1.filename=""
commanddialog1.filter="*.txt|*.txt"
a=commanddialog1.filename
open a for input as #1
do while not EOF(1)
input #1,inputdata
loop
text1.text=inputdata & vbcrlf