PC Review


Reply
 
 
RS
Guest
Posts: n/a
 
      31st May 2008
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.

 
Reply With Quote
 
 
 
 
Norman Jones
Guest
Posts: n/a
 
      31st May 2008
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


"RS" <(E-Mail Removed)> wrote in message
news:7247C8E9-2469-4177-A284-(E-Mail Removed)...
> 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.
>


 
Reply With Quote
 
Canlink
Guest
Posts: n/a
 
      31st May 2008
On May 30, 8:44 pm, RS <R...@discussions.microsoft.com> wrote:
> 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
 
Reply With Quote
 
Canlink
Guest
Posts: n/a
 
      31st May 2008
On May 31, 8:44 am, Canlink <canl...@gmail.com> wrote:
> On May 30, 8:44 pm, RS <R...@discussions.microsoft.com> wrote:
>
>
>
> > 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 workbookand
> > 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". You can delete these words and then see the macro if you wish.
> Regards
> Geoff


 
Reply With Quote
 
Norman Jones
Guest
Posts: n/a
 
      31st May 2008
Hi Geoff,

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



---
Regards.
Norman
"Canlink" <(E-Mail Removed)> wrote in message
news:2108822d-86f9-4d9c-a683-(E-Mail Removed)...
On May 31, 8:44 am, Canlink <canl...@gmail.com> wrote:
> On May 30, 8:44 pm, RS <R...@discussions.microsoft.com> wrote:
>
>
>
> > 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.

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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to enable macro for addin Ashish Microsoft Outlook Program Addins 3 19th Jan 2010 06:59 PM
Calling macro from a different addin =?Utf-8?B?TmF5YW4=?= Microsoft Excel Programming 2 3rd Aug 2007 08:50 PM
run addin function from macro =?Utf-8?B?ZGFyc2c=?= Microsoft Excel Programming 3 29th Aug 2006 06:00 PM
Addin Macro in Toobar zSplash Microsoft Excel Programming 5 23rd Jul 2006 05:28 PM
Running an addin-macro from another Macro =?Utf-8?B?U2FtaXI=?= Microsoft Excel Programming 3 23rd May 2006 06:57 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:09 AM.