如题,用FILELISTBOX列出了一个文件目录下的文件
想点击文件名时就打开该文件,请问可以怎么实现?

解决方案 »

  1.   

    Option ExplicitPrivate 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 File1_Click()
        ShellExecute Me.hwnd, vbNullString, File1.Path & "\" & File1.FileName, vbNullString, vbNullString, 1
    End Sub