With statement on many sheets
Thanks Dave. It was the array("sheet1", "sheet 2", "another sheetname") line
I was after.
Rob
"Dave Peterson" wrote in message
...
How about just looping through the list of sheets:
dim mySheetNames as Variant
dim iCtr as long
mysheetnames = array("sheet1", "sheet 2", "another sheetname")
for ictr = lbound(mysheetnames) to ubound(mysheetnames)
with worksheets(mysheetnames(ictr))
.EnableSelection = xlUnlockedCells
.ScrollArea = "A1:J75"
.protect
end with
next ictr
Rob wrote:
I would like to know how to use a single With statement to apply to about
15
sheets
The statement for one sheet is.....
With Sheet5
.EnableSelection = xlUnlockedCells
.ScrollArea = "A1:J75"
.protect
End With
Rob
--
Dave Peterson
|