View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
STEVE BELL STEVE BELL is offline
external usenet poster
 
Posts: 692
Default Macros from Add-in?

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...


--
steveB

Remove "AYN" from email to respond
"davegb" wrote in message
ups.com...
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?