Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default calling a method on an object created in a different addin

I wonder if this is possible. I am a newbie by the way.

Addin1 has a function called obj that returns an object that is
created with methods etc.

Public Function obj() As MySpecialType ' type from tld com interface
On Error Resume Next
' some tuff here to create object
End Function

In another separate addin (addin2) i need to be able to get a handle
to the object and call methods on this object

Set localobj = Application.run obj
localobj.dostuff...etc

I can't get this to work. I must be mis-understanding something.

PS, I am trying not to hard code in references if possible. the idea is
the code is dynamic, finds if addins are loaded, call methods on those
to merge a certain dataset.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default calling a method on an object created in a different addin


got it working...just needed to appreciate run takes a string. doh.

Dim result
Dim obj
Set obj = Application.Run("somemeth")
result = obj.method1 etc...

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
Calling for pages before they are created. bsspewer Excel Discussion (Misc queries) 4 March 27th 06 10:55 PM
Calling addin Function from another workbook? thinkingfield[_8_] Excel Programming 1 November 11th 04 03:39 AM
Calling a sub from a addin in vba Roger[_9_] Excel Programming 4 November 3rd 03 10:39 AM
Calling an Excel Addin from VBA ABN Excel Programming 2 July 31st 03 02:33 PM
Calling an Excel Addin from VBA ABN Excel Programming 0 July 31st 03 02:02 PM


All times are GMT +1. The time now is 06:46 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"