Can't find program in different drive!!!
Posted on 1998-11-25
I have a vb program which starts up another windows program. In the code below, I'm starting notepad.
Private Sub cmdStartProgram_Click()
Dim RetVal As Variant
RetVal = Shell("NoteTab.exe", 1)
This works. The notepad.exe file is in the C drive. However, if I call another program from another drive (like the D, E, or F drive) without specifying the full path name to that file, I get an error.
How do I fix this, without hardcoding the full pathname into the code? Thanks.