PC Review


Reply
Thread Tools Rate Thread

calling a method on an object created in a different addin

 
 
scotty
Guest
Posts: n/a
 
      12th Jan 2007
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.

 
Reply With Quote
 
 
 
 
scotty
Guest
Posts: n/a
 
      12th Jan 2007

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 With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Async object within a webservice method Paul Hadfield Microsoft ASP .NET 0 17th Sep 2007 01:00 PM
calling a method on a object that you know the string name for. scotty Microsoft Excel Programming 1 12th Jan 2007 02:49 PM
object calling outside method Pujo Aji Microsoft C# .NET 1 21st Jan 2005 11:37 AM
Calling Method of Unknown Object Vinod I Microsoft C# .NET 4 31st Dec 2003 08:22 AM
Calling C# method from VB and passing object by reference robertm Microsoft ASP .NET 1 20th Aug 2003 04:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:20 PM.