Custom Button - Excel Add-in

G

Guest

Greetings,

I am pretty new to this. I have created an add-in for Excel 2003, however I
need to assign a custom button to it. However, the macro doesn't show up in
the "Assign Macro" list when I try to assign it.

If it's just a macro I put in the Excel Directory (C:\Program
Files\Microsoft Office\OFFICE11\XLSTART) the macro shows up... but, that's
not what I need.

Thanks for your help in advance,
mark
 
L

Leith Ross

Hello Mike,

Add-Ins don't expose their macros by design. Here's another thought.
Maybe your code should be in a VBA project module. You can copy the
module into any workbook you use later on. The macros in the module
will show up in the Assign Macro list.

Sincerely,
Leith Ross
 
G

Guest

so, then... what's the advantage of using an add-in? i want this macro to be
used company-wide, sent out to maybe 20 people. if they have to add an
additional file to a directory, it's sort of a bother.

thanks though, you have certainly answered my question. i guess it's just
not possible :)

thanks,
mark
 
G

Guest

Addins are great in that they can be distributed as you say. In order to
assign a button you will have to do some work to create a toolbar and then
put your buttons on there. Or you could piggy back on one of the existing
toolbars or the menu bar. In the Thisworkbook module of the addin there is an
addin install and unistall event. When the event is fired you dynamically
create the buttons and/or toolbar and off you go... This is not a project for
the faint of heart but it is very do-able.
 
G

Guest

The button will not be attached to a praticular sheet, but rather it will be
attached either to a custom menu that you create, (similar to the File,
Tools, or Help menu) or it will be a custom toolbar (like your standard
toolbar or formatting toolbar). These will be available at any time... You
can even attach to the right click menus if that would be the most
appropriate. Chip Pearson and Ron Debruin have good resources on this. MSDN
also has some good examples. Look for CommandBar and CommandBarControl. I am
gone for the day but if you wnat send me an e-mail and I can send you an
addin I developed which will give you a good start...
 
G

Guest

so, it is possible to add a custom button to the end users sheet that would
execute the add-in macro? can you point me to a some good reference material
that may achieve this?

thanks so much Jim...,
mark
 

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