Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
GetObject when more than 1 Excel is running Peter T Excel Programming 2 January 21st 10 08:56 PM
How to reach Application Objects in Events? NOPIK Excel Programming 3 February 25th 07 05:27 PM
GetObject method from excel to other application from remote server sandra mangunsong via OfficeKB.com Excel Programming 1 February 24th 05 07:13 PM
Find all running Excel Application objects news.bluewin.ch Excel Programming 3 February 13th 04 10:28 PM
Excel Getobject error Jaya Excel Programming 4 July 17th 03 07:13 PM


All times are GMT +1. The time now is 04:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"