Solved

Calling a UDF addin in the personal work book

Posted on 2012-03-13
3
286 Views
Last Modified: 2012-06-21
I have a user defined function. I created an addin for it so that it would show up in every work book and that works fine and the function works well.

I also created a macro in my personal workbook that calls the udf.

When my udf is defined in an individual workbook, the macro and udf work great, but when I have the udf as an add-in (so that I don't have to add it to every workbook), I get a
Compile Error:
Sub or Function not defined and it highlights my udf.

I basically want to be able to run my macro from any workbook (hence why I put it in my personal workbook), without needing to add the function to every workbook (which is why I put it in as an add-in).

Any ideas as to why the personal workbook macro won't recognize my udf when it's in an add-in?
0
Comment
Question by:Josh_Blade
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 48

Expert Comment

by:Martin Liss
ID: 37716928
Make it Public rather than Private.
0
 

Accepted Solution

by:
Josh_Blade earned 0 total points
ID: 37719431
The function was already public. For some reason, when I added it to the personal macro workbook as well as having it as an addin, it works fine.

I would have thought there would be some kind of conflict with the same function in an addin and in the personal workbook, but I guess not.
0
 

Author Closing Comment

by:Josh_Blade
ID: 37736756
Messed around and got it working.
0

Featured Post

Ready to get started with anonymous questions?

It's easy! Check out this step-by-step guide for asking an anonymous question on Experts Exchange.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question