Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening an exe file

Status
Not open for further replies.

MJD1

Technical User
Jul 18, 2003
134
CA
Hi, I need to open open an exe file via a button on a form. I have the following code but I get a type mismatch error message when I run it. I'm obviously missing something here.

not sure if I need to reference the full path of where the file is located (Y:\CMS\CMSUPDATE1.exe

any help is appreciated!


Dim stAppName As Long

'Close database and open exe file

stAppName = ("CMSUPDATE1.exe")
Shell stAppName, vbMaximizedFocus

DoCmd.Quit
 
Yes you do need to specify the full path, also your variable stAppName is set as long when it should be string, also there's no need for the parentheses when you assign a value to it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top