*Method one
Dim varSheets As Variant
Dim i as Integer
varSheets = Array("Apples", "Oranges")
For i = lbound(varsheets) to ubound(varsheets)
With Worksheets(varSheets(i))
'..........your code
End With
Next i
*Method two
Dim wks as Worksheet
For Each wks in Worksheets
Select Case wks.Name
Case "Apples", "Oranges"
With wks
'.........your code
End With
Case Else
'Do nothing
End Select
Next wks
HTH,
"AMY Z." <(E-Mail Removed)> wrote in message
news:6D5744FD-54D6-4C57-901F-(E-Mail Removed)...
> Hi,
> I have a procedure that formats Worksheet1 when something happens in a
> certain cell. Worksheet1 is titled: APPLES. The procedure I have for
> this
> works great.
>
> Working part of the procedure I have now looks like this:
>
> With Worksheets("APPLES")
> Hide rows, change font color etc.
>
> I would now also like to have the same thing happen in Worksheet2.
> Worksheet2 is called ORANGES. Something like: With Worksheets("APPLES &
> ORANGES")....
>
> Is is possible to have mutiple worksheets follow the same procedure?
>
> Thank you for your time,
> Amy
>
>
|