Why are an add-in's functions visible, but macros not?

jasmith4

Active Member
Joined
May 16, 2008
Messages
337
I have a macro-enabled workbook with several modules and class modules full of code. Two modules in particular are meant as UI entry points: PublicMacros and PublicFunctions. These are the only two modules with no Option Private Module statement: PublicMacros has nothing but Public Subs with no parameters, and PublicFunctions has nothing but Public Functions.

When I have the workbook open, I can hit Alt-F8 to see the Public Subs, and I can click the Formula ribbon's Insert Function tool and choose the User Defined category to see the Public Functions.

But when I save the workbook as an add-in (in %APPDATA%\Microsoft\AddIns), and I make sure the checkbox is on in the Add-Ins manager, I can see the Public Functions, but NOT the Public Subs! Is that normal for Excel? I swear I've seen add-ins' Public Subs before...
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,216,094
Messages
6,128,785
Members
449,468
Latest member
AGreen17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top