Looping through sheets

E

Eric

I want to be able to loop through sheets that I have
created but I am unsure of how to do it. I am experienced
with For...Next loops, just not with sheets. What I am
trying to accomplish is below...

Dim cell as Range
'Dim sheet as Range - remarked out for now...
For each sheet...

For Each cell In Range("A2:A200").Cells
Select Case cell.Value

Case 151
cell.Value = "Fall Audit"
With cell.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With

Case 175
cell.Value = "Fall Audit"
With cell.Font
.Name = "Arial"
.FontStyle = "Regular"
.Size = 10
.Strikethrough = False
.Superscript = False
.Subscript = False
.OutlineFont = False
.Shadow = False
.Underline = xlUnderlineStyleNone
.ColorIndex = xlAutomatic
End With
Case Else
Exit For
End Select
Next cell

Next sheet

Any ideas???
 
D

Derek

Sub loopSheets()
Dim wkSht As Worksheet

For Each wkSht In Worksheets
' code
Next wkSht
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