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

PM - Aug 19, 2009 at 02:39 AM - Latest reply:  Ravishankar
- Feb 23, 2016 at 06:27 AM
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
See more 

9 replies

+16
Helpful
2
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
Was this answer helpful?  
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
kaiyasit 30 Posts Sunday August 9, 2009Registration date April 20, 2010 Last seen - Aug 19, 2009 at 08:05 PM
+3
Helpful
1
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
kaiyasit 30 Posts Sunday August 9, 2009Registration date April 20, 2010 Last seen - Aug 19, 2009 at 06:35 AM
+1
Helpful
Use hyperlinks
+1
Helpful
Hi

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

thanks

PM
0
Helpful
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.
-1
Helpful
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??