-
Assign Object
I need some code that will assign the currently open instance of Excel to an object. Maybe something like this
objXL = SelectObject("Excel.Application")
or
objXL = GetObject("Excel.Application")
I don't know what object command, if any, to use here. Any thoughts?
-
Re: Assign Object
The GetObject version is what you want - but it has unpredictable results (if there are 3 instances of Excel open, you can't tell which one it will return).
For further info (and code to work with it once you have the object), see the tutorial link in my signature.