Fill the listbox only with file name (1 Viewer)

theDBguy

I’m here to help
Staff member
Local time
Today, 03:38
Joined
Oct 29, 2018
Messages
21,473
Private Sub lstFiles_DblClick(Cancel As Integer)

fShellExecute Me.lstFiles

End Sub
Thank again
Yup! Trying to open a file with using just the filename won't work. Also, since my demo lists all the files in a folder and its subfolders, you could have duplicate filenames showing in the listbox. Double-clicking on any of them wouldn't specify which one to open. That's why you need the whole path.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 03:38
Joined
Oct 29, 2018
Messages
21,473
Based on @MajP comments, I have updated the demo file to use two columns, so ShellExecute would keep working.

Hope this helps...
 

Attachments

  • theDBguyListFilesDemoV1.3.zip
    44.4 KB · Views: 87

Gasman

Enthusiastic Amateur
Local time
Today, 11:38
Joined
Sep 21, 2011
Messages
14,301
It doesn't works because the listbox has just one column and the name is embedded (includes also the path and file name )
Not really hard to add an extra column? :(
 

gstylianou

Registered User.
Local time
Today, 13:38
Joined
Dec 16, 2013
Messages
357
Not really hard to add an extra column? :(
Not really hard to add an extra column? :(

Means that you didn't understand what exactly is the issue..! Anyway, thank for your interest..

(Please read all the communication with theDBguy and MajP..)
 

Gasman

Enthusiastic Amateur
Local time
Today, 11:38
Joined
Sep 21, 2011
Messages
14,301
Not really hard to add an extra column? :(

Means that you didn't understand what exactly is the issue..! Anyway, thank for your interest..

(Please read all the communication with theDBguy and MajP..)
Well theDBguy managed it?
 

Users who are viewing this thread

Top Bottom