Hi
I am populating names of files in a folder in a listbox,
what I need to do is to open the file shown in the listbox column by double-clicking it, the following code doesn't work.
Thanks for your help
Brenda
---Code---
Private Sub lstFile2_DblClick(Cancel As Integer)
On Error GoTo Err_lstFile2_DblClick
Dim stAppName As String
stAppName = CurrentProject.path & "\Old MDB Files\" & lstFile2.ItemData
MsgBox stAppName
Call Shell(stAppName, 1)
Err_lstFile2_DblClick:
MsgBox Err.description
Exit Sub
End Sub
---Code---
I am populating names of files in a folder in a listbox,
what I need to do is to open the file shown in the listbox column by double-clicking it, the following code doesn't work.
Thanks for your help
Brenda
---Code---
Private Sub lstFile2_DblClick(Cancel As Integer)
On Error GoTo Err_lstFile2_DblClick
Dim stAppName As String
stAppName = CurrentProject.path & "\Old MDB Files\" & lstFile2.ItemData
MsgBox stAppName
Call Shell(stAppName, 1)
Err_lstFile2_DblClick:
MsgBox Err.description
Exit Sub
End Sub
---Code---