How to reference a Class Module located in an add-in or another workbook?

K

keithb

This statement:

Dim AppClass As New EventClass

Works properly if the EventClass Class module is located the in the same
workbook. It does not work properly if the EventClass module is located in
an Add-in file or in another open workbook. How can I refer to EventClass
when its Class Module is located in an Add-in file, or in another open
workbook?

Thanks,

Keith
 
T

Tushar Mehta

This statement:

Dim AppClass As New EventClass

Works properly if the EventClass Class module is located the in the same
workbook. It does not work properly if the EventClass module is located in
an Add-in file or in another open workbook. How can I refer to EventClass
when its Class Module is located in an Add-in file, or in another open
workbook?

Thanks,

Keith
How to use a class (object) from outside of the VBA project in which it
is declared
http://support.microsoft.com/default.aspx?scid=kb;en-us;555159

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top