Formating Macro

B

Brady Snow

I want to apply this macro to all the workshhets in a
workbook.

Sub Change_Font()
Cells.Font.Name = "Arial"

End Sub

How would I code this to change all the cells in all the
worksheets?

Many Thanks,

Brady Snow

McKinney, Texas
 
D

Don Guillett

have a look at format>style
just recorded this. Delete what you don't need
Sub Macro1()
'
' Macro1 Macro
' Macro recorded 11/4/2003 by Don Guillett
'

'
With ActiveWorkbook.Styles("Normal")
.IncludeNumber = True
.IncludeFont = True
.IncludeAlignment = True
.IncludeBorder = True
.IncludePatterns = True
.IncludeProtection = True
End With
With ActiveWorkbook.Styles("Normal").Font
.Name = "Antique Olive Roman"
.Size = 10
.Bold = False
.Italic = False
.Underline = xlUnderlineStyleNone
.Strikethrough = False
.ColorIndex = xlAutomatic
End With
Selection.Style = "Normal"
End Sub
 
P

Pete McCosh

Sub Change_Font()
Dim wk as worksheet

For Each wk in ThisWorkbook.Worksheets
wk.Cells.Font.Name = "Arial"
Next wk

end Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top