ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Any way to get new instance of Excel on double-click? (https://www.excelbanter.com/excel-programming/346978-any-way-get-new-instance-excel-double-click.html)

Ken Shaffer

Any way to get new instance of Excel on double-click?
 
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



Peter T

Any way to get new instance of Excel on double-click?
 
Hi Ken,

try -

xlApp.IgnoreRemoteRequests = True

You may want to trap the original value and restore before xlApp.quit

Regards,
Peter T

"Ken Shaffer" wrote in message
...
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





Fredrik Wahlgren

Any way to get new instance of Excel on double-click?
 

"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



Ken Shaffer

Any way to get new instance of Excel on double-click?
 
That did it! I now see 2 EXCEL processes after double-clicking.

Thanks! BTW, how'd you know? Help wasn't very helpful, so off to the
newsgroup I went.

ken


"Peter T" <peter_t@discussions wrote in message
...
try -

xlApp.IgnoreRemoteRequests = True

You may want to trap the original value and restore before xlApp.quit

"Ken Shaffer" wrote in message
...
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.




Ken Shaffer

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





Peter T

Any way to get new instance of Excel on double-click?
 
Thanks! BTW, how'd you know? Help wasn't very helpful, so off to the
newsgroup I went.


I don't know! Maybe I discovered it myself a long time ago or perhaps I had
read about it in this ng.

"Help" is unsurpassed as a reference but often requires you already know the
keyword you want to know more about.

In your adjacent to Fredrick - to clarify

VB - generic Visual Basic, the basis of VB6, VBScript, VBA etc
VBA - VB for (Office) Applications, with many extended functions for the
specific app (eg Excel)

The Q&A of this post could apply to any of the above where a reference has
been set to the excel.application, whether explicitly or implicitly (eg VBA
is hosted in the current instance).

VBE - Visual Basic Editor

Regards,
Peter T


"Ken Shaffer" wrote in message
...
That did it! I now see 2 EXCEL processes after double-clicking.

Thanks! BTW, how'd you know? Help wasn't very helpful, so off to the
newsgroup I went.

ken


"Peter T" <peter_t@discussions wrote in message
...
try -

xlApp.IgnoreRemoteRequests = True

You may want to trap the original value and restore before xlApp.quit

"Ken Shaffer" wrote in message
...
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.






Ken Shaffer

Any way to get new instance of Excel on double-click?
 

"Peter T" <peter_t@discussions wrote in message
...
In your adjacent to Fredrick - to clarify

....
The Q&A of this post could apply to any of the above where a reference has
been set to the excel.application, whether explicitly or implicitly (eg

VBA
is hosted in the current instance).


Thanks. I posed here because it seemed pertinent to Excel, so I guess I did
the right thing and not pose a similar question on the vb newsgroup.

VBE - Visual Basic Editor


doh! I knew that!


ken




All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com