Re: Class in separate add in?
From: Jezebel (warcrimes_at_whitehouse.gov)
Date: 02/24/05
- Next message: zSplash: "Re: Minimize app vs. Not Visible App"
- Previous message: Jezebel: "Re: Programming for different Word versions"
- In reply to: Chuck: "Class in separate add in?"
- Next in thread: Chuck: "Re: Class in separate add in?"
- Reply: Chuck: "Re: Class in separate add in?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 25 Feb 2005 08:54:32 +1100
You can add a property to the module that instantiates and returns a
reference to the class. Eg the addin called XXX has a class called clsPBar;
in a module in the addin add code like this --
Public Property Get PBarClass() as clsPBar
Set AddinClass = new clsPBar
End Property
Then any module with a reference to the addin can use
With XXX.PBarClass
....
You'll need to modify the property code if you don't want to instantiate a
new class object with every call -- eg if you have just one instance shared
by all callers.
"Chuck" <Chuck@discussions.microsoft.com> wrote in message
news:52D806DF-18FD-44EE-B53E-034950127A86@microsoft.com...
> I'm trying to get my head around classes ... ideally I'd like to create
> add
> ins that contain code used by a variety of subs in other add ins. I'm
> using
> a progress bar form as my learning tool -- for instance ideally any sub in
> any add in would be able to call up the progress bar from a single
> dedicated
> add in; the alternative seems to be to copy the progress bar code to every
> add in.
>
> Is it possible to use a class that exists in a different add in? When I
> set
> up a class in one add in and add a reference to it in second, the second
> only
> sees the first's modules and ThisDocument. Do I need to create a sub in a
> module in the first add in that allows the second to manipulate the class
> in
> the first?
>
> Apologies if this is a murky question. Any guidance much appreciated...
>
> Should I be creating mac
- Next message: zSplash: "Re: Minimize app vs. Not Visible App"
- Previous message: Jezebel: "Re: Programming for different Word versions"
- In reply to: Chuck: "Class in separate add in?"
- Next in thread: Chuck: "Re: Class in separate add in?"
- Reply: Chuck: "Re: Class in separate add in?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|