Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Formating Macro

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Formating Macro

have a look at formatstyle
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

"Brady Snow" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Formating Macro


Sub Change_Font()
Dim wk as worksheet

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

end Sub

-----Original Message-----
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
.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formating/Macro/Script Help Shepord Excel Discussion (Misc queries) 7 September 30th 09 10:04 PM
Formating percentage in macro orquidea Excel Discussion (Misc queries) 2 December 19th 07 01:38 AM
Conditional formating or Macro code [email protected] Excel Discussion (Misc queries) 3 June 14th 07 04:30 PM
Inserting and Formating Variables in a Header using a macro Strabo Excel Discussion (Misc queries) 0 March 14th 06 05:07 PM
formating macro vishu Excel Discussion (Misc queries) 6 June 15th 05 01:02 PM


All times are GMT +1. The time now is 03:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"