I've been trying to open some applications (.exe) that are on my flash drive using multiple ComboBox's to select the different types of programs and a button to lauch the selected program. My issue is the flash drive wont always be e:\. I need my program to open the files from the flash drives current directory. I've done it in batch real easy...Visual Basic I'm having trouble. In batch or cmd its as easy as this
start "" "theprogramfold er\theprogram.e xe"
I've tried to use
shell "theprogramfold er\theprogram.e xe"
but obviously just end up with an error
plus I need it to be used with the combobox so ive done
under the main form load
and under my button1_click i have
Thanks for any help
start "" "theprogramfold er\theprogram.e xe"
I've tried to use
shell "theprogramfold er\theprogram.e xe"
but obviously just end up with an error
plus I need it to be used with the combobox so ive done
Code:
ComboBox1.Items.Add(ProgramName1) ComboBox1.Items.Add(ProgramName2) ComboBox2.Items.Add(ProgramName3) ComboBox2.Items.Add(ProgramName4)
and under my button1_click i have
Code:
Select Case ComboBox1.SelectedIndex
Case 0
Shell("Program1folder\program1.exe")
Case 1
Shell("Program2folder\program2.exe")
End Select
Select Case ComboxBox2.SelectedIndex
Case 0
Shell("Program3folder\program3.exe")
'... and so on
Comment