View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
nmventure nmventure is offline
external usenet poster
 
Posts: 5
Default Taking control of an existing instance of Excel

Thanks for the suggestion Tom. The example Microsoft shows on this page is
exactly what I want to do, and I thank you, but for some reason I am
getting an "automation error" when I try to take control of the instance by
workbook name as Microsofts example shows to do.....

Set xlApp = GetObject("daily.xls").Application
or
Set xlApp = GetObject("daily").Application

both generate the message:
runtime error '-2147221020 (800401e4)'
automation error
invalid syntax

The Microsoft example, copy and pasted below directly from their page, does
not use the .xls part of the workbook or file name:
"Set xlApp = GetObject("Book2").Application"

According to them, this should work with Excel 97 through 2003. Has anyone
tried to do this with any success....
(I am using office pro 2000)

Thanks again for your assistance,

Mike




"Tom Ogilvy" wrote in message
...
http://support.microsoft.com/default...b;en-us;288902

claims you can attach to an instance of excel if you know a specific
document in that instance.

I haven't tested it, but maybe they are right. since you are looking for
Daily.xls it might work for you. Let us know.

--
Regards,
Tom Ogilvy