G Gary''s Student Feb 22, 2008 #2 Sub allsheets() Dim w As Worksheet For Each w In Worksheets w.Range("A1").Value = 1 Next End Sub is an example of doing something on all the worksheets in a workbook.
Sub allsheets() Dim w As Worksheet For Each w In Worksheets w.Range("A1").Value = 1 Next End Sub is an example of doing something on all the worksheets in a workbook.
D Don Guillett Feb 22, 2008 #3 Sub allshts() For Each ws In ActiveWorkbook.Sheets MsgBox ws.Name Next ws End Sub