Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Open new instance of excel every time I click file | Excel Discussion (Misc queries) | |||
Force excel to start new instance when I double-click a workbook | Excel Discussion (Misc queries) | |||
Open new instance of excel 2007 every time I click file | Excel Discussion (Misc queries) | |||
I would like to open a new instance of Excel each time I double-click on a xls file | Excel Discussion (Misc queries) | |||
I would like to open a new instance of Excel each time I double-click on a xls file | Excel Worksheet Functions |