Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Calling a UDF addin in the personal work book

Posted on 2012-03-13
3
Medium Priority
?
287 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 49

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

Office 365 Training for Admins - 7 Day Trial

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

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

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
New style of hardware planning for Microsoft Exchange server.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…
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…

661 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