Anthony2oo4
02-04-2005, 11:25 PM
Ok guys i have a file list box that is set to show the files of a certain folder. I wwant to have it so that when an item is selected in the box, it executes the file and it runs. I have this so far, but keep getting errors.
Private Sub File1_Click()
openselected
End Sub
Public Sub openselected()
SelectedFilePath = File1.Path
SelectedFileName = File1.FileName
Shell SelectedFilePath & "\" & SelectedFileName
End Sub
Iv also used this line
Shell (SelectedFilePath & "\" & SelectedFileName)
and
Shell ("SelectedFilePath & "\" & SelectedFileName")
Why isnt this working and also is it possible that whateva is show in the box, that the file extention can be take off it.
Thanks for your time. ;)
Private Sub File1_Click()
openselected
End Sub
Public Sub openselected()
SelectedFilePath = File1.Path
SelectedFileName = File1.FileName
Shell SelectedFilePath & "\" & SelectedFileName
End Sub
Iv also used this line
Shell (SelectedFilePath & "\" & SelectedFileName)
and
Shell ("SelectedFilePath & "\" & SelectedFileName")
Why isnt this working and also is it possible that whateva is show in the box, that the file extention can be take off it.
Thanks for your time. ;)