View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ken Shaffer Ken Shaffer is offline
external usenet poster
 
Posts: 9
Default Any way to get new instance of Excel on double-click?

Well, not sure of the nomenclature, I guess a VB program manipulating
another application is VBA, whereas a VB macro in Excel is VBE.

Anyway, Peter's solution worked for me.

But for clarification I want to be able to use Excel normally without
interfering with the Excel object being used by the VBA program. So, while
the VBA program is running, if I then use Windows and move my mouse over to
another spreadsheet and double-click, I don't want to see any workbooks
being manipulated by the VBA program in the Excel-Window list.

A simple test: close out all instances of Excel, verify not in task manager
process list. Start VBA and place a breakpoint after opening a workbook of
interest and run the program waiting for the breakpoint to occur. Next,
double-click on some other spreadsheet and view the Excel-Window list. The
workbook loaded by the VBA program should *NOT* be in the list.

Hope that clarifies things.

ken



"Fredrik Wahlgren" wrote in message
...

"Ken Shaffer" skrev i meddelandet
...
I have a VB program which manipulates a workbook via excel object

created.
Then if I open another spreadsheet by double-clicking, I see the
spreadsheet
being manipulated is in the Window list as well as the one I just

opened.

Is there a way that double-clicking will bring up a new instance of

Excel
so
that the spreadsheets being manipulated via VB won't be seen? Perhaps in
the
VB program itself there might be an option to set so that windows thinks
Excel hasn't started yet and so creates a new instance to open it.

Thanks,

Ken Shaffer



VB? I assume you mean VBA, right? You can start a new Excel instance like
this
Dim objXL As Excel.Application
Set objXL = New Excel.Application
You can then let this new instance open another spreadsheet. Could you
explain why you want to do this? What's your problem?

/Fredrik