Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Here is the macro you requi
Sub Formatt() Dim r As Range For Each r In Selection r.HorizontalAlignment = xlCenter r.Font.FontStyle = "Bold Italic" r.Font.Underline = xlUnderlineStyleSingle Next End Sub Macros are very easy to install and use: 1. ALT-F11 brings up the VBE window 2. ALT-I ALT-M opens a fresh module 3. paste the stuff in and close the VBE window If you save the workbook, the macro will be saved with it. To use the macro from the normal Excel window: 1. ALT-F8 2. Select the macro 3. Touch Run To remove the macro: 1. bring up the VBE window as above 2. clear the code out 3. close the VBE window To learn more about macros in general, see: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Gary''s Student - gsnu200844 "Aruna" wrote: And how to create a macro please "Gary''s Student" wrote: A good question! First create a macro to do the formatting and then: View Toolbars Customize... (way at the bottom of the drop-down) Commands Macros and drag the custom buttton onto the toolbar. Finally assign the macro to the new button. -- Gary''s Student - gsnu200844 "Aruna" wrote: How to create an icon on my toolbar, clicking on which, will perform some defined tasks? Example of my expected result: Clicking on that icon once, make the selected cell into bold, italics, underlined and centered. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a macro so when I click the icon, the response is the A1 ce | Excel Discussion (Misc queries) | |||
why does excel create a new desktop icon when file is saved? | Setting up and Configuration of Excel | |||
How to create icon sets for excel 2007 conditionnal formating ? | Excel Discussion (Misc queries) | |||
Is there a way to create a toolbar icon for 'page setup'? | Excel Worksheet Functions | |||
How do I create a pivot table if the pivot table icon or menu ite. | Charts and Charting in Excel |