Openning Other Applications using VBA

choward

Registered User.
Local time
Today, 14:25
Joined
Jan 31, 2008
Messages
39
Hi guys,

i am trying to call an application (Powersim Studio) using vba. BUT i want to be able to call it by calling the file in particular. I have tried:

stName = "c:\thisisatest.sip"
shell stName, vbNormalFocus

but no avail.

I am hoping the operating system will determine the appropriate application to launch when the 'thisisatest.sip' file is called.

Any ideas would be most appreciated!
 
You can do this one of two ways. First you can go into windows explorer and set up the file association for this file type. Second, you may be able to do something like the following:

stName = "c:\myapplicationPathAndName.exe c:\thisisatest.sip"
shell stName, vbNormalFocus

Hope this helps.
 
Simple Software Solutions

Here is an example many members have used. It's coding principles will, I hope, meet your requirements. The basis of this snippet is to list the contents of a folder in a list box then by double-clicking on any item in the list box it will open the file as per the software it was created in. Therefore, .Docs open in Word, .xls in Excel, PDF in Adobe, etc. Hope this works ofr you.

CodeMaster::cool:
 

Attachments

Users who are viewing this thread

Back
Top Bottom