[RESOLVED] Opening files listed in a List box
I have a listbox on one of my Access forms. The listbox contains 4 fields, the first field is the filename. I want to make it so when a user doubleclicks on of the filenames in the listbox that the file will open in wordpad. Anyone know a good way to do this?
Re: Opening files listed in a List box
If the filename in the listbox has the full path, use this
VB Code:
Private Sub List0_DblClick(Cancel As Integer)
Shell "C:\Program Files\Windows NT\Accessories\wordpad.exe " & List0.Value, vbNormalFocus
End Sub
Otherwise, add the file path to the end of the wordpad.exe string. Obviously if you're not on NT, the path to wordpad will be different too.
Re: [RESOLVED] Opening files listed in a List box