View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to get an object reference to an ALREADY open excel spreadshee

have you tried using GetObject instead of CreateObject?

Assuming you are NOT talking about Excel VBA when you say VBScript

--
Regards,
Tom Ogilvy

"JP" wrote in message
...
I need to manipulate an already open excel spreadsheet using VBScript. My
problem is that I can't seem to be able to get an object reference to

excel
if it's open already. I was able to open an excel workbook and add a

sheet,
but I wasn't able to connect to a spreadsheet it if it was already open.
Anybody knows how to do it in VBScript?
E.g: manually open MS Excel and type something in Sheet1. Then when you'd
run this VBScript that I need, it would connect to Sheet1 and would

display
the content of it in a message box.

Thanks a lot!
JP