Addin macro

R

RS

I’ve got a macro in an addin that’s installed in excel 2003 and I want to
assign a button to that sub. When I try to assign it to a button I can not
see it in the macro selection box. I have it as a public sub as follows:

Public Sub MergeFormatCells()
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub

I’m trying to assign this to the excel toolbar button for all workbook and
not just assign it to one workbook.
 
N

Norman Jones

Hi R,

Even though the macro will not be visible in
macro selection box, you can simply type in
the macro name and run it.
 
C

Canlink

I’ve got a macro in an addin that’s installed in excel 2003 and I wantto
assign a button to that sub. When I try to assign it to a button I can not
see it in the macro selection box. I have it as a public sub as follows:

Public Sub MergeFormatCells()
With Selection
.HorizontalAlignment = xlGeneral
.VerticalAlignment = xlTop
.WrapText = True
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With
End Sub

I’m trying to assign this to the excel toolbar button for all workbook and
not just assign it to one workbook.

Hi R.
Check the General - Declararations of the Module containing the
macro. Macros are hidden but usable by typing the name into the run
box if you see "Option Private Module".
Regards
Geoff
 
C

Canlink

Hi R.
Check the General - Declararations of the Module containing the
macro. Macros are hidden but usable by typing the name into the run
box if you see "Option Private Module". You can delete these words and then see the macro if you wish.
Regards
Geoff
 
N

Norman Jones

Hi Geoff,

I do not think that an add-in's macros
would be visible in the macro selection
dropdown.
 

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