lizzie0606
New Member
- Joined
- Nov 17, 2009
- Messages
- 2
Hello I am trying to copy a format from one sheet to multiply sheets with a macro I am having trouble with one line that would select each sheet. Any suggestions?? Here is what I have so far... The pink is where I keep having errors. This is only my second macro that i've done and i recorded it first then started my modifications. Thanks in advance!!!
Sub Test1()
' Format2 Macro
'Modified to format all sheets without activating
'Sub Macro2 ()
'For each worksheet in the workbook...
For Each sht In Worksheets
sht.Activate
Sheets("Template Long").Select
Cells.Select
Range("B1").Activate
Application.CutCopyMode = False
Selection.Copy
Sheets.Select
Cells.Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Next sht
End Sub
Sub Test1()
' Format2 Macro
'Modified to format all sheets without activating
'Sub Macro2 ()
'For each worksheet in the workbook...
For Each sht In Worksheets
sht.Activate
Sheets("Template Long").Select
Cells.Select
Range("B1").Activate
Application.CutCopyMode = False
Selection.Copy
Sheets.Select
Cells.Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Next sht
End Sub