View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JS[_4_] JS[_4_] is offline
external usenet poster
 
Posts: 14
Default For Each...Dynamically formatting multiple worksheets

To loop though all sheets in a workbook use something like the following

Sub MultiSheet()
Dim sht As Worksheet
For Each sht In ActiveWorkbook.Sheets
sht.Range("A1").Value = 10
Next sht
End Sub

Precede each command with sht. so that it is performed on each worksheet as
the code loops through all worksheets