Re: open file filelistbox
Not every file type can be shelled using the Shell function.
If you try to shell text file you would need to specify associated program like the NOTEPAD:
Shell "notepad c:\test.txt" and so on...
In you case it may look like:
Shell "notepad " & strFullPath
However better way is to use ShellExecute api function that resolves the associated program automatically.
Search forum for samples.
Re: open file filelistbox
Example:
vb Code:
Option Explicit
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 Long
Private Const SW_SHOWNORMAL = 1
Private Sub Command1_Click()
ShellExecute Me.hwnd, vbNullString, File1.FileName, vbNullString, "C:\", SW_SHOWNORMAL
End Sub