Thread
:
How to reference code located in an Add-in File
View Single Post
#
4
Posted to microsoft.public.excel.programming
Tushar Mehta
external usenet poster
Posts: 1,071
How to reference code located in an Add-in File
You cannot access private event procedures in sheet modules in other
workbooks. If you wrote the add-in, consider making the code in the
event procedure part of a application level event procedure. For more
see XL VBA help for 'Using Events with the Application Object' (w/o the
quotes). It's a bit more work up front but the benefits more than make
up for it.
I never use worksheet or workbook level event procedures in any real
code I write. It's just bad form.
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article ,
says...
Thank you for answering. I read the article and it was helpful; however, I'm
still having a problem.
I have an add in named mapper.xla. I want to use the "'mapper.xla'!Sheet1"
Worksheet_Activate subroutine to run worksheet activation code for the
workbook that has the mapper.xla attachment. So far, nothing that I have
tried seems to work. Any suggestions?
Thanks,
Keith
"Tushar Mehta" wrote in message
om...
In article ,
says...
What is the correct syntax for calling a VBA subroutine or function that
exists in a code module the resides in an Excel add-in file? Does the
calling syntax need to state the name of the code module where the called
code is located?
Thanks,
Keith
For a couple of examples see
How to use a class (object) from outside of the VBA project in which it
is declared
http://support.microsoft.com/default...b;en-us;555159
Don't worry about the class module stuff. Just focus on how the
function New_clsEmployee is called, especially the use of single quotes
in the file name.
--
Regards,
Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
Reply With Quote
Tushar Mehta
View Public Profile
Find all posts by Tushar Mehta