VBA code to open non excel programs [Solved/Closed]

Report
-
 Billybob -
Hello,

I need vba code to open other documents besides excel doc's

e.g open a word file, access file etc..

Can anyone help??

thanks

PM

6 replies

Iv found how it works now, thanks for your help anyway!! See below code!

ActiveWorkbook.FollowHyperlink Address:="(Enter location in here, along with file name)", NewWindow:=True
23
Thank you

A few words of thanks would be greatly appreciated. Add comment

CCM 4120 users have said thank you to us this month

you can make a VBA macro stating:

Sub My_macro()

Shell ("C:\MyProgramFolder\MyProgram.exe")

End Sub


- This will open the program MyProgram.exe :)
it worked for me..Thank u
Worked a treat
Posts
30
Registration date
Sunday August 9, 2009
Status
Member
Last seen
April 20, 2010
11
Do you have example for me?
I will try as you want.
Hi,

I want to open a excel file from a specified location and that location I will mentioned in excel sheet where macro is being created(range A1 or A3).

Thanks
Posts
30
Registration date
Sunday August 9, 2009
Status
Member
Last seen
April 20, 2010
11
Use hyperlinks
Hi

Once the file is open, do you know how I can get the external file/doc to print using vba code??

thanks

PM
I dont have an exact exmple, but im assuming it would be on the lines of the below code to open an excel file. But is there a way of opening a word file or access file??

Workbooks.Open Filename:= _
"N:\Home\Excel1.xls"

Or maybe you know of a way to assign a hyperlink to a command button, that would be a easier option.
Hi,

i want to be able to use a command button to open the files not a hyperlink.

Do you know how to do this??