Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

finding a specific excel object

Status
Not open for further replies.

christhedonstar

Programmer
Apr 9, 2007
215
GB
Hi,

How in VBA in Excel would I search for all Excel.exe processes that currently exist on the machine and set a reference to the Excel object which has a workbook called "TheWorkBookIWant.xls"?

Thanks,

Chris
 
Why not simply this ?
Set myWBobj = GetObject("TheWorkBookIWant.xls")
Set myXLapp = myWBobj.Application

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
That was on someone elses machine on mine - I get run-time error '-2147221020 (800401e4)'

Automation error
Invalid syntax
 
need to put full path - no idea what was going on on the other guys machine. Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top