I am trying to get opened instances of excel application and operate between them.
I have 2 excel files in open and while running the code xlApp.Workbooks.Count always 0.![]()
Please Login or Register to view this content.
But GetObject("", "Excel.Application").Application.Name returns Microsoft Excel and GetObject("", "Excel.Application").Application.hwnd returns a valid handle.
Also I tried with Set xlApp = GetObject("", "XLMAIN") which throws error ActiveX can't create object
Why it is not picking the running excel files and give count? Any ideas?
Bookmarks