View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Texas Aggie Texas Aggie is offline
external usenet poster
 
Posts: 74
Default Repetive Formatting/Creating a Toolbar button

Howdy, I'm going to walk you through making a toolbar button that will be
able to help you.

On the Tools menu, click Customize, and then click the Toolbars tab.
Click New.
In the Toolbar name box, type the name you want, and then click OK.
Click the Commands tab.
Do the following:

Scroll down till you see Macro and select,
then click and drag "Custom Menu Item" into the tool bar you created.

To rename the button, right click the button and goto name

Now you need to create a Macro, press Atl+F11 to open the VBA Window

Create a Module and place this sample code in there

Sub FormatCell()

With Selection.Font
.Name = "Arial Black"
.FontStyle = "Italic"
.Size = 12
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
End Sub

change as you perfer.

Now attack this macro by right clicking your toolbar you created and select
customize, then right click again and go to Assign Macro.

Then select the Macro titled "FormatCell"

Vuala your done

new every cell you want to format all you have to do is press that button

--
If this reply was helpful, please indicate that your question has been
answered to help others find anwsers to similar questions.

www.silverbirddesigns.com

Fighting Texas Aggie Class of 2009


"rllngriver" wrote:

Hi:

I work on different worksheets all of the time and have to choose format (on
different cells specific font withing the cell). I normally right click on
the font within the cell I need to format and choose format, select Font,
change the color to red, and choose strike through. How do I create a button
so that whenever I want to format any cell that I want to, I can have those
steps done immediately by clicking on a button.

I also sometimes need to format font so that is just green in color.

All this I want this button to be on the toolbar no matter which workbook I
am working on. I want it to be there all of the time.


Thank you.