juddymarch
Technical User
- Aug 10, 2007
- 17
Hi, I have an access form that is used to open other access applications using the shell command.
This is working fine but now my client would also like to be able to open one of their third party programs from this form as well.
There is currently a desktop shortcut which is used to open their third party program.
The shortcut contains the following
Target - C:\PBS4\tb40\TB40RUN.EXE C:\PBS4\fld\Hyper4.exe
Startin - C:\PBS4\fld
I thought I could just use the properties from the shortcut to open the program.
I have tried the following code within a shell command:
myShell = Chr(34) & "C:\PBS4\tb40\TB40RUN" & Chr(34) & " " & Chr(34) & "C:\PBS4\fld\Hyper4" & Chr(34)
Shell myShell, vbMaximizedFocus
When I run the code I get an error message "Not a valid file name". However this error message appears to come from the exe application I'm trying to open.
Just wondering if anyone would know what is wrong with my shell command, or if this is possible with the shell command. I have tried swapping things around etc but haven't had any luck.
Thanks
Justin
This is working fine but now my client would also like to be able to open one of their third party programs from this form as well.
There is currently a desktop shortcut which is used to open their third party program.
The shortcut contains the following
Target - C:\PBS4\tb40\TB40RUN.EXE C:\PBS4\fld\Hyper4.exe
Startin - C:\PBS4\fld
I thought I could just use the properties from the shortcut to open the program.
I have tried the following code within a shell command:
myShell = Chr(34) & "C:\PBS4\tb40\TB40RUN" & Chr(34) & " " & Chr(34) & "C:\PBS4\fld\Hyper4" & Chr(34)
Shell myShell, vbMaximizedFocus
When I run the code I get an error message "Not a valid file name". However this error message appears to come from the exe application I'm trying to open.
Just wondering if anyone would know what is wrong with my shell command, or if this is possible with the shell command. I have tried swapping things around etc but haven't had any luck.
Thanks
Justin