working with a group of sheets

  • Thread starter Thread starter GKeramidas
  • Start date Start date
G

GKeramidas

how would you do this without selecting? or by using the index number 1-3
instead of the sheet names?

Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
With Range("m28")
..Value = "test"
..Font.Bold = True
End With
 
Sheets(Array(Worksheets(1).Name, Worksheets(2).Name,
Worksheets(3).Name)).Select
With Range("m28")
..Value = "test"
..Font.Bold = True
End With


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
thanks for the reply bob.
2 things

this doesn't put the value test into all 3 sheets, only the active one.
also, is there way to enter a value into all 3 sheets without selecting?
 
Sorry Gary, this works

Dim i As Long

For i = 1 To 3
With Worksheets(i).Range("M28")
.Value = "test"
.Font.Bold = True
End With
Next i


--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
hi bob:

that's what i am using, just thought there might be a way to do it all at
once.

thanks
 
Back
Top