谢谢

解决方案 »

  1.   

    楼主是意思是打开txt文件,而不是把txt文件读到textbox中,我也在找方法用shellexecute函数肯定行,方法自己找吧!因为我现在也不知道!
      

  2.   

    我顺便找了一下,你自己建个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