is_utf8:0,
 
Search : in
By :

VBA code to open non excel programs

Last answer on Aug 21, 2009 10:23:43 am BST PM, on Aug 19, 2009 7:39:41 am BST 
 Report this message to moderators

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

Configuration: Excel 2003

Best answers for « VBA code to open non excel programs » in :
Connect a database (MDB) to excel Show[VBA] Connecting a database (MDB) to excel Below is a tips of how to connect an Access database (MDB) in an application excel Add reference Microsoft DAO object librairy X.X In a general module (eg Module1) paste the code below...
[VBA: VB6] Using excel from another application Show[VBA: VB6] Using excel from another application Here is a little routine to call Excel from VB6 or another Office application. Paste in a general module (eg Module1) In VBA>> Insert>> Module and paste in the window ... In VB6>>...
VBA: How to know everything about the file folder ShowVBA: How to know everything about the file folder Preliminaries In module In sheet1 module Preliminaries Open a new workbook Add a module In module ' Declare variables for wizard. Public balloon1 As Balloon Public balloon2...
Download Notepad++ ShowNotepad + + is an editor of source code , which supports several programming languages: This project, based on the Sparkled constituent (a very powerful editor of component)), is written in pure C + + with win32 api and STL (which insures the most...
Video compression (codecs) ShowThe concept of codec A non-compressed video image occupies approximately 1 MB. In order to obtain a fluid video, it is necessary to have a frequency of at least 25 or 30 images per second, which produces a data flow of approximately 30 MB/s, that...

1

kaiyasit, on Aug 19, 2009 11:35:45 am BST

Use hyperlinks

Reply to kaiyasit

2

PM, on Aug 19, 2009 2:22:06 pm BST

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??

Reply to PM

3

kaiyasit, on Aug 20, 2009 1:05:30 am BST

Do you have example for me?
I will try as you want.

Reply to kaiyasit

4

PM, on Aug 20, 2009 9:59:04 am BST

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.

Reply to PM

5

PM, on Aug 20, 2009 11:07:24 am BST

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

Reply to PM

6

RJ, on Aug 20, 2009 2:43:30 pm BST

You can make a VBA macro stating:

Sub My_macro()

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

End Sub


- This will open the program MyProgram.exe :)

Reply to RJ

7

 PM, on Aug 21, 2009 10:23:43 am BST

Hi

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

thanks

PM

Reply to PM