Link to home
Start Free TrialLog in
Avatar of brothertruffle880
brothertruffle880Flag for United States of America

asked on

Invoking an application using VBA

Hi I'm just trying to understand/learn VBA here:

The code in line 1 is working, the code in line 2 isn't.   Can anyone tell me why?

User generated image
Avatar of mvdeveloper

Not sure, but it might be compatibility issue if certblst.exe is a 64 bit app. Office by default installs a 32 bit VBA and so uses the 32 bit shell.

Try it using cscript (the console scripting applet): there are two versions, one under system and one under syswow64. Try each and see if there is a difference.

To run with cscript, just store your VBA in a text file with a .vbs extension and invoke:
(path_to)\cscript.exe your_file.vbs
Avatar of LazyFolk
Flag of Switzerland image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jorge Paulino
You don't need to use scripting for that ... you can use Shell method instead.


Shell "C:\Program Files\Microsoft Office\Office14\excel.exe"

But you can use GetShortPathName() API to get the short name of a specific path. Check this example: