怎么样在VB中调用文本文件呢?
我用过shell"notepad.exe 文本文件名称",vbnormalfocus可是当我把文本文件名称换成所在路径时,就不好用了!这事怎么回事呢? --------------------编程问答-------------------- '添加 Command1 并在你的程序相同路径下摆个 test.txt
Dim appdisk$
Private Sub Form_Load()
appdisk = IIf(Right(App.Path, 1) = "\", App.Path, App.Path & "\")
End Sub
Private Sub Command1_Click()
If Dir(appdisk & "test.txt") <> "" Then Shell "Notepad " & appdisk & "test.txt", vbMaximizedFocus
End Sub
补充:VB , 基础类