2个回答
展开全部
Private Sub Command1_Click()
Text1.Text = ""
With CommonDialog1
.InitDir = App.Path
.Filter = "文本文件|*.txt"
.ShowOpen
End With
Open CommonDialog1.FileName For Input As 1
Dim str As String
Do While Not EOF(1) ' 循环至文件尾。
Input #1, str
Text1.Text = Text1.Text & vbNewLine & str
Loop
Close 1
End Sub
Private Sub Command2_Click()
End
End Sub
就是读取问题答案给你了
Text1.Text = ""
With CommonDialog1
.InitDir = App.Path
.Filter = "文本文件|*.txt"
.ShowOpen
End With
Open CommonDialog1.FileName For Input As 1
Dim str As String
Do While Not EOF(1) ' 循环至文件尾。
Input #1, str
Text1.Text = Text1.Text & vbNewLine & str
Loop
Close 1
End Sub
Private Sub Command2_Click()
End
End Sub
就是读取问题答案给你了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询