Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default How to start an application from Excel VBA

I would like to start an application from Excel VBA and pass command line
parameters to it. Once the app is started it should run completely
independently from the instance of Excel that started it.

Excel shouldn't wait on it to to anything (including terminate).

Thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default How to start an application from Excel VBA

See the Shell statement.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


wrote in message
...
I would like to start an application from Excel VBA and pass
command line
parameters to it. Once the app is started it should run
completely
independently from the instance of Excel that started it.

Excel shouldn't wait on it to to anything (including
terminate).

Thanks.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 142
Default How to start an application from Excel VBA

Thanks, I haven't tried it yet but it looks like exactly what I needed. I
tried "Spawn", "Execute", "Start" and several others, but I didn't think to
look up "Shell".

On Thu, 6 Apr 2006 17:15:48 -0500, "Chip Pearson"
wrote:

See the Shell statement.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to start an application from Excel VBA


The VBA shell command is as follows:

programPath = "C:\Program Files\Internet Explorer\iexplore.exe" '
works
'programPath = "iexplore.exe" ' does not work
Shell programPath + " " + fileToLaunch, vbNormalFocus

but the drawback is that the invoked program (iexplore.exe, at least in
my case) needs to have the FULL PATH to where the program exists = the
"C:\Program Files\Internet Explorer" which may or may not work on
someone elses computer. Is there a trick to find where the executing
program lives? This hardcoding will not work and is not transportable.

Thanks,


--
JWM6
------------------------------------------------------------------------
JWM6's Profile: http://www.excelforum.com/member.php...o&userid=33413
View this thread: http://www.excelforum.com/showthread...hreadid=530730

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to start an application from Excel VBA


Got the answer from this post
http://www.excelforum.com/showthread.php?t=53297

--
JWM
-----------------------------------------------------------------------
JWM6's Profile: http://www.excelforum.com/member.php...fo&userid=3341
View this thread: http://www.excelforum.com/showthread.php?threadid=53073



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
Excel cannot auto start external application Jason Falzon[_2_] Excel Discussion (Misc queries) 0 March 25th 10 08:57 AM
microsoft office excel can't start the application Becky Excel Discussion (Misc queries) 0 February 1st 07 03:25 AM
cannot start the source application for this object in excel Philip Mollica Charts and Charting in Excel 3 May 27th 06 02:46 AM
How to using VBA to automatic start excel application? Roger Setting up and Configuration of Excel 1 May 16th 05 10:15 AM
Excel displays picture of Britney Spears in a bikini every time I start the application Liam Weston Excel Programming 2 June 3rd 04 11:32 AM


All times are GMT +1. The time now is 10:14 AM.

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

About Us

"It's about Microsoft Excel"