Thread: Macro Library
View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Macro Library

With an XLA add-in, Excel will automatically search that add-in for
functions when called from a worksheet cell. The same does not hold
true for VBA code. VBA won't search anything to which it does not have
a reference. Therefore, to call code that resides in an XLA, the
calling workbook project must have a reference set to the XLA or use
Application.Run. In other words, if you don't tell Excel where to
find something, it won't find it.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


On Sat, 18 Apr 2009 14:40:01 -0700, velvetlady
wrote:

The third method mentioned is what I have always tried to do. All the general
macros are saved in personal.xla which is always loaded at startup.
I always get the message that the sub or function cannot be found when I try
to execute the calling macro from the open workbook.
What am I doing wrong????