View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Corey Corey is offline
external usenet poster
 
Posts: 363
Default Value NOT placed in 2 sheets, but in ALL others

Sub Workbook_Info()
On Error Resume Next
With Sheets("1:50")
' If sheet is NOT sheet1 or sheet3 then
..Select
ActiveSheet.Unprotect
Range("R59").Select
ActiveCell.FormulaR1C1 = "=MAX('Page 1:" & Worksheets(Worksheets.Count).Name & "'!R[0]C[-8])"
ActiveSheet.protect DrawingObjects:=True, Contents:=True, Scenarios:=True,
AllowFormattingCells:=True
End With
End Sub

The above code places the MAX value in cell R59 in ALL sheets in my workbook.
But i have discovered that i DO NOT want it to be placed in 2 sheets of the workbook.
Sheet1 and Sheet3.

How can skip sheet1 and 3 so they are not included in the code above?

Corey....