Macros from Add-in?

D

davegb

I want to put a number of macros and a datasheet I use when I'm doing a
particular task in an Add-in. I did as Walkenbach's book instructed,
created a spreadsheet and put the macros in the spreadsheet with a
toolbar to access the macros, then saved the spreadsheet as an Add-in.
But when I click on the buttons, they open the spreadsheet to access
the macros, not the Add-in (which I installed in the Tools, Add-ins
window. I tried reassiging the macros to the Add-in, but as promised,
the macros from the Add-in don't show in the macros box. How do I get
the macro buttons to access the macros in the add-in?
 
S

STEVE BELL

Without a sample of your code - it is hard to say.

But here's a sample of code I use in Excel 2000

With .Controls.Add(Type:=msoControlButton)
.BeginGroup = True
.Caption = "Do My Thing"
.Style = msoButtonCaption
.OnAction = "YourCodeName"
End With


"YourCodeName" refers to the name of a macro in a standard module
in your workbook or addin...
 

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