Delete range on open
Hello, I've sure appreciated the help that I've gotten and found on this sight.
However I have a small problem.
I am wanting to Clear a range "j29:q38" on several sheets when a workbook
opens. The sheet names vary and can increase or decrease in number. I do have
a range "ZZListing a2:a300" that contains employee names which correspond to
the sheet names that I I want to clear. But I have six other sheets, that I
don't want to clear, the names of these sheets all begin with ZZ, ie
ZZListing, ZZProjects, etc. I hope that I am explaining myself.
Here is the last code that I've tried.
Dim WS As Worksheet
For Each WS In Worksheets
If WS.Name < "ZZ" Then
Range("j29:q38").ClearContents
End If
Next
|