vb新手,一个关于路径的问题,求教
本帖最后由 bcrun 于 2013-12-26 09:37:51 编辑
Private Sub Form_Load()
On Error Resume Next
Dim fso As New FileSystemObject
aa = App.Path & "\files\xieyi.txt"
If fso.FileExists(aa) = False Then
MsgBox ("找不到文件")
Unload Me
Else
Dim inputdata As String
showxieyi.Text = ""
Open App.Path & "\files\xieyi.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, inputdata '一行行读文件
showxieyi.Text = showxieyi.Text + inputdata + vbCrLf
Loop
Close #1
End If
End Sub