Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Addin macro

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RS - 31 May 2008 01:44 GMT
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.
Norman Jones - 31 May 2008 02:22 GMT
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.

---
Regards.
Norman

> 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
[quoted text clipped - 16 lines]
> I’m trying to assign this to the excel toolbar button for all workbook and
> not just assign it to one workbook.
Canlink - 31 May 2008 13:44 GMT
> 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
[quoted text clipped - 16 lines]
> 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
Canlink - 31 May 2008 13:47 GMT
> > 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
[quoted text clipped - 23 lines]
> Regards
> Geoff
Norman Jones - 31 May 2008 14:55 GMT
Hi Geoff,

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

---
Regards.
Norman
> On May 30, 8:44 pm, RS <R...@discussions.microsoft.com> wrote:
>
[quoted text clipped - 29 lines]
> Regards
> Geoff
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.