Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Launching Standalone Program from within Excel.

Is it possible to launch a standalone program from within Excel. That is, I
want to have a .exe - that I have created in VB 2005 - launch based on the
click of an icon or click of a menue item from withing Excel.

The idea being that I have chosen to create the project in a standalone for
and not as an XLA. The question now is how to launch it from Excel or am I
restricted to launching it from outside of Excel?

If its possible I am assuming that I will have to create some logic in my
standalone program which creates the linkages in Excel (i.e. tool bar/menu
items) upon install.

Thanks

EM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Launching Standalone Program from within Excel.

This will require some kind of workbook in Excel. You could theoretically
place the code in personal.xls but then you have to assume that your users
have personal.xls. You're probably better off with an addin to hold the code.
The code you need in Excel is something like this:
Sub LaunchYourApp()
Dim RetVal As Variant
RetVal = Shell("YourApp.exe", vbNormalFocus)
End Sub

You can have your program install the addin via ActiveX if you would like. I
can send you some code to do this if you would like. Let me know.

--
Charles Chickering

"A good example is twice the value of good advice."


"ExcelMonkey" wrote:

Is it possible to launch a standalone program from within Excel. That is, I
want to have a .exe - that I have created in VB 2005 - launch based on the
click of an icon or click of a menue item from withing Excel.

The idea being that I have chosen to create the project in a standalone for
and not as an XLA. The question now is how to launch it from Excel or am I
restricted to launching it from outside of Excel?

If its possible I am assuming that I will have to create some logic in my
standalone program which creates the linkages in Excel (i.e. tool bar/menu
items) upon install.

Thanks

EM

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Launching Standalone Program from within Excel.

Try it this way...

Shell Environ("COMSPEC") & " /c """ & FileName & """"

where FileName is your executable's name (with extension) qualified by its
full path.

Rick


"ExcelMonkey" wrote in message
...
Is it possible to launch a standalone program from within Excel. That is,
I
want to have a .exe - that I have created in VB 2005 - launch based on the
click of an icon or click of a menue item from withing Excel.

The idea being that I have chosen to create the project in a standalone
for
and not as an XLA. The question now is how to launch it from Excel or am
I
restricted to launching it from outside of Excel?

If its possible I am assuming that I will have to create some logic in my
standalone program which creates the linkages in Excel (i.e. tool bar/menu
items) upon install.

Thanks

EM


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Launching Standalone Program from within Excel.

Thanks for the repsonses. Yes it would be helpful to see an example of the
XLA code.

I was originally going down the XLA path when I began building this
application. I was simply going to make it an XLA add-in. But I decided
that I wanted to create some security in the application that went above and
beyond the general password protection in XLAs. The catch is that the
stand-alone application does not yet feel like an integrated add-in (like an
XLA would). I want to try to create some connectivity with the user while
they are in Excel. Ironically, I may have to introduce an XLA element to
this!

Thanks

EM

"Charles Chickering" wrote:

This will require some kind of workbook in Excel. You could theoretically
place the code in personal.xls but then you have to assume that your users
have personal.xls. You're probably better off with an addin to hold the code.
The code you need in Excel is something like this:
Sub LaunchYourApp()
Dim RetVal As Variant
RetVal = Shell("YourApp.exe", vbNormalFocus)
End Sub

You can have your program install the addin via ActiveX if you would like. I
can send you some code to do this if you would like. Let me know.

--
Charles Chickering

"A good example is twice the value of good advice."


"ExcelMonkey" wrote:

Is it possible to launch a standalone program from within Excel. That is, I
want to have a .exe - that I have created in VB 2005 - launch based on the
click of an icon or click of a menue item from withing Excel.

The idea being that I have chosen to create the project in a standalone for
and not as an XLA. The question now is how to launch it from Excel or am I
restricted to launching it from outside of Excel?

If its possible I am assuming that I will have to create some logic in my
standalone program which creates the linkages in Excel (i.e. tool bar/menu
items) upon install.

Thanks

EM

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
launching an external program or proceedure within vba Mark HOlcomb Excel Programming 1 December 14th 05 06:18 PM
launching an external program or proceedure within vba Gary''s Student Excel Programming 0 December 14th 05 06:15 PM
Launching Program with Time Sensitive Data Jerry Erbe Excel Discussion (Misc queries) 0 August 29th 05 09:50 PM
Excel 2000 Program not launching Ligaya Excel Discussion (Misc queries) 9 February 24th 05 06:38 PM
Launching Excel programmatically not the same as launching excel manually Atchoum Excel Programming 2 November 24th 04 06:24 PM


All times are GMT +1. The time now is 05:13 PM.

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"