Excel Automation Application is shared with interactive?
Hi Huey,
Try Hiding the instance of Excel:
'=============
Public Sub Tester()
Dim oApp As Object
Dim oWB As Object
Set oApp = CreateObject("Excel.Application")
Set oWB = oApp.Workbooks.Open("C:\MyBook.xls")
oApp.Visible = False
'Your code
End Sub
'<<=============
---
Regards,
Norman
"Huey" wrote in message
...
I have a VBScript that is creating an Excel.Application object and writing
to
workbooks\worksheets in the background. This operation takes hours to
complete and if I open a spreadsheet to do other work while my script is
running, this other workbook opens in the application window my script
created. This causes my script to fail when it attempts to control the
Application object. How can I prevent any other interaction with the
Application object my script creates? I want to automatically open a new
Application window when I manually open a workbook. Hope this makes
sense
and someone can tell me how to fix this. Thanks.
|