Solved

Calling a UDF addin in the personal work book

Posted on 2012-03-13
3
276 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
  • 2
3 Comments
 
LVL 46

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel VBA 10 39
populate Excel dropdown via ADO and VBA 6 17
Creating An Intelligent Dropdown 8 27
vba autofilter in row 4 6 9
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
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…

776 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