G
Guest
Thanks for taking the time to read my question.
I have a list of files and their file path (Location) in a list box. I
would like to be able to have the user select an item in the list then click
a button to open that file. I don't want to make the items in the list box
hyperlinks as I use the list box for other things as well.
I tried using the Shell function but it didn't work.
The value of the list box when an item is selected is something like:
"C:\Documents and Settings\User1\My Documents\Test.csv"
So in my sub I have:
Dim RetVal
RetVal = Shell(Me.lst_FileFolder,1)
but that just gives me an error. I'd like them to be able to click the
button and the file opens in what ever program the file is associated to.
Thanks again for your help,
Brad
I have a list of files and their file path (Location) in a list box. I
would like to be able to have the user select an item in the list then click
a button to open that file. I don't want to make the items in the list box
hyperlinks as I use the list box for other things as well.
I tried using the Shell function but it didn't work.
The value of the list box when an item is selected is something like:
"C:\Documents and Settings\User1\My Documents\Test.csv"
So in my sub I have:
Dim RetVal
RetVal = Shell(Me.lst_FileFolder,1)
but that just gives me an error. I'd like them to be able to click the
button and the file opens in what ever program the file is associated to.
Thanks again for your help,
Brad