start external program

  • Thread starter Thread starter C Williams
  • Start date Start date
C

C Williams

I am using Visual Studio 2003 and trying to use the "Start External
Program" option to start Excel when I run the program. What happens is
that Excel opens and then immediately closes. I know that in the past
it has opened and stayed open, and I am wondering what I have
inadvertently changed and how I can change it back.


Thanks,

-Casey
 
as you stated it in your post when you open excell it should stay open. This
is correct. You are eather closing excel or it is bombing.
are you shelling
shell("excel.exe" filename.xls)
i belive that opens a excel file.

Chris
 
No, I am not using "shell"--I am trying to use Visual Studio's Start
External Program feature, which should open up a blank excel file.

Excel works just fine when I open it manually (outside of visual studio)
 
I am sorry I have never used that

This is the example in .net for visual basic from the msdn on starting
application exampel
Dim ProcID As Integer
' Start the Calculator application, and store the process id.
ProcID = Shell("CALC.EXE", AppWinStyle.NormalFocus)
' Activate the Calculator application.
AppActivate(ProcID)
SendKeys.SendWait("22")
SendKeys.SendWait("*")
SendKeys.SendWait("44")
SendKeys.SendWait("=")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top