Access Functions & Subprocedures in an Add-In

S

Seth Schwarm

I have written several functions and subprocedures in a spreadsheet file. I
saved the file as an .XLA and then loaded the add-in, but chose not to copy
it to my local add-ins folder.

I read somewhere if you want to have a macro run code you have written it
must be a subprocedure. So I did that. However, when I go to the Macro menu
or create macro menu the subprocedures are not available.

What's weird is - I can write formulas in any workbook I open and I can
reference the code I wrote as a function and the formulas work great. So why
can't I 'see' the subprocedures to run macros?

Any help is greatly appreciated.

Seth
 
K

Ken Puls

Actually, that is by design. Typically when you distribute an XLA, you
don't want users just running the macros unless they are supposed to.

I'd suggest that you may want to add a menu structure or toolbar to your
workbook, and John Walkenbach has some great examples of how to do that
here: http://j-walk.com/ss/excel/tips/commandbars.htm

Note that if you are using Excel 2007, and menus will show up in a
special section of the menu, as the user interface has been redesigned
to use the Ribbon, rather than commandbars.

HTH,

Ken Puls, CMA - Microsoft MVP (Excel)
www.excelguru.ca
 
S

Seth Schwarm

Thank you. I have briefly read through the suggested link and this is a far
better answer to my question than I could have hoped for.

Seth
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top