Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing a toolbar icon
Is it possible to have the Center icon perform a double job like for example
the Sort Ascending icon (Shift+Sort Ascending and sort is performed in descending order) so that if I pres Shift+Center the following code should run: Sub SelectionCenterAcross() On Error Resume Next Selection.HorizontalAlignment = xlCenterAcrossSelection End Sub Regards Hans Knudsen |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing a toolbar icon
Hi Hans,
There already is a second function assigned to the Center button - it is Merge and Center. Just hold down the shift key for this functionality. If you want a button for Center Across Selection you can add a new blank button to the any toolbar and assign you macro to it. To add a button - choose View, Toolbars, Customize, Commands tab, Macros Categroy, and drag Custom Button to the toolbar. Then right click the new button and choose Assign Macro and pick your code. -- Thanks, Shane Devenshire "Hans Knudsen" wrote: Is it possible to have the Center icon perform a double job like for example the Sort Ascending icon (Shift+Sort Ascending and sort is performed in descending order) so that if I pres Shift+Center the following code should run: Sub SelectionCenterAcross() On Error Resume Next Selection.HorizontalAlignment = xlCenterAcrossSelection End Sub Regards Hans Knudsen |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Customizing a toolbar icon
Shane Devenshire
Thank you. I wasn't aware that 'Center' already has this double function. Hans "ShaneDevenshire" wrote in message ... Hi Hans, There already is a second function assigned to the Center button - it is Merge and Center. Just hold down the shift key for this functionality. If you want a button for Center Across Selection you can add a new blank button to the any toolbar and assign you macro to it. To add a button - choose View, Toolbars, Customize, Commands tab, Macros Categroy, and drag Custom Button to the toolbar. Then right click the new button and choose Assign Macro and pick your code. -- Thanks, Shane Devenshire "Hans Knudsen" wrote: Is it possible to have the Center icon perform a double job like for example the Sort Ascending icon (Shift+Sort Ascending and sort is performed in descending order) so that if I pres Shift+Center the following code should run: Sub SelectionCenterAcross() On Error Resume Next Selection.HorizontalAlignment = xlCenterAcrossSelection End Sub Regards Hans Knudsen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Customizing toolbar in Excel2007? | Excel Discussion (Misc queries) | |||
Customizing Toolbar Buttons | Excel Discussion (Misc queries) | |||
Customizing the toolbar Icon | Excel Programming | |||
Customizing the toolbar Icon | Excel Programming | |||
Customizing Toolbar | Excel Programming |