- Home
·
- Miscellaneous
·
- Ever wanted to launch another program from a CD? If you need to use your program from a CD, and lau
Ever wanted to launch another program from a CD? If you need to use your program from a CD, and lau
Ever wanted to launch another program from a CD? If you need to use your program from a CD, and launch other programs from it, on the same CD,
API Declarations
'Just place the code in any Sub, or any point in your program, a command button for example.
Rate Ever wanted to launch another program from a CD? If you need to use your program from a CD, and lau
(1(1 Vote))
drvletter$ = Left(App.Path, 1) ' finds the drive letter, the letter 1st left from the app path.
direct$ = ":\windows\notepad.exe" ' replace with the program path of your choice
Path$ = drvletter$ & direct$ ' makes the full path, ready to be used to shell the program
On Error GoTo loaderror ' tells the program to go to the loaderror (see below) if there is an error
Shell Path$, vbMaximizedFocus ' this will load the program, maximised and with the focus - ie active. change as needed.
Exit Sub
loaderror: ' the program jumps to here if there is an error, avoiding the program crashing.
MsgBox Err.Number & " " & Err.Description, vbCritical, "Error" ' message to user
Ever wanted to launch another program from a CD? If you need to use your program from a CD, and lau Comments
No comments yet — be the first to post one!
Post a Comment