Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 67
Default Universal VBA code for opening MS (Office ) programs from excel

All,

I would like to develop a VBA code that opens other programs (like
PowerPoint, or Paint). The VBA code should be universal, i.e. should work on
different machines.

Since the applications will be installed on different machines and paths, I
would like to know how I can write a universal code that opens the programs,
no matter where these are installed.

Could someone give some recommendations?

Best,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Universal VBA code for opening MS (Office ) programs from excel


You have to use the Shell command, this is directly from the excel
help:
This example uses the Shell function to run an application specified by
the user. On the MacIntosh, the default drive name is "HD" and portions
of the pathname are separated by colons instead of backslashes.
Similarly, you would specify Macintosh folders instead of \Windows.

' Specifying 1 as the second argument opens the application in
' normal size and gives it the focus.
Dim RetVal
RetVal = Shell("C:\WINDOWS\CALC.EXE", 1) ' Run Calculator.


--
The Code Cage Team

Regards,
The Code Cage Team
www.thecodecage.com
------------------------------------------------------------------------
The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=25385

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Opening an Office 2007 Excel file in Office 2003 charstachura Excel Discussion (Misc queries) 1 November 8th 07 09:36 PM
Opening Different Programs using Excel. ronaldo444 Excel Worksheet Functions 3 July 25th 06 06:18 PM
opening different programs with excel macro buttons shrek Excel Worksheet Functions 0 September 30th 05 12:41 PM
OPENING TWO DIFFERENT EXCEL PROGRAMS EXCEL SPREADSHEETS Excel Discussion (Misc queries) 3 December 2nd 04 11:14 PM


All times are GMT +1. The time now is 05:19 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"