Saturday, January 7, 2012

Open Applications using Shell Method


In this post, we will go over one of the common methods for launching external programs from within Microsoft Access by utilizing the shell method in VBA.  A couple of other features also demonstrated in the example found at the end of this post are setting the external application as a child window within access and giving the shelled program a custom window caption by using API calls.





To launch an application from within Access, use the following code in a function or sub:

Shell ("C:\YourProgramPath.exe")

A functional example database can be found at this link: Shell Method, or on the AccessInsider Examples Page.

Comments have been included with the example code as to provide the readers with a better understanding of the methods used.

0 comments:

Post a Comment

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More