我顺便找了一下,你自己建个button按扭吧!Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As LongPrivate Sub Command1_Click() spath = "c:\abc.txt" lret = ShellExecute(hwnd, "open", spath, vbNullString, vbNullString, 1) If lret >= 0 And lret <= 32 Then MsgBox "error opening viewer program" End IfEnd Sub
spath = "c:\abc.txt"
lret = ShellExecute(hwnd, "open", spath, vbNullString, vbNullString, 1)
If lret >= 0 And lret <= 32 Then
MsgBox "error opening viewer program"
End IfEnd Sub