Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Getting objects other than 'Excel.Application using GetObject()
I was looking at the GetObject() function help and have a question regarding these samples: Set LayerObject = GetObject("C:\CAD\SCHEMA.CAD!Layer3") and: Dim MyObject As Object Set MyObject = GetObject("C:\DRAWINGS\SAMPLE.DRW", "FIGMENT.DRAWING") The first sample gets a regerence to an object called 'Layer3' contained in schema.cad. Is anything similar possible for Excel? For Example: Sub Test() Set objWorkbook = GetObject("C:\Scripts\Test.xls") Debug.Print objWorkbook.Name 'Set objSheet = GetObject("C:\Scripts\Test.xls!Sheet1") End Sub The first GetObject() call works, but the second call returns an 'invalid syntax' error. Is it possible to use GetObject() to get reference to objects other than Excel.Workbook (like Worksheet or any other)? Thanks in advance. -- urkec |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
GetObject when more than 1 Excel is running | Excel Programming | |||
How to reach Application Objects in Events? | Excel Programming | |||
GetObject method from excel to other application from remote server | Excel Programming | |||
Find all running Excel Application objects | Excel Programming | |||
Excel Getobject error | Excel Programming |