![]() |
#2
lowxiong2013-07-31 19:48
|
程序界面如图:
只有本站会员才能查看附件,请 登录
弹出错误提示如图:
只有本站会员才能查看附件,请 登录
以下是代码:
Option Explicit
Private Sub Command1_Click()
Dim strfilename As String
Dim nfilenum As Long
Dim strall As String
Dim strline As String
strfilename = App.Path & "hero.txt"
nfilenum = FreeFile()
Open strfilename For Input As nfilenum
Do While Not EOF(nfilenum)
Line Input #nfilenum, strline
strall = strall & strline & vbCrLf
Loop
Label1.Caption = Label1.Caption & strall
End Sub
请教一下,App.Path是哪个目录?我的hero.txt在这个程序的同一目录下,总是提示那个错误,求解决,哪里错了?
