Hello there, I have code that I want to run on two specific (named) sheets. I'm not sure what I need to do.
It doesn't like this:
How do I correct this please?
Thanks.
VBA Code:
Private Sub Workbook_Open()
Dim sh As Worksheet
For Each sh In Worksheets
[B] If sh.Name = "Property Numbering", "VO Areas" Then[/B]
sh.Protect UserInterFaceOnly:=True, AllowSorting:=True, AllowFiltering:=True
Range("C13").Select
Selection.ClearContents
Range("C8").Select
Selection.ClearContents
Range("B2").Select
Selection.ClearContents
Range("B2").Select
Else
sh.Protect UserInterFaceOnly:=True
End If
Next
End Sub
It doesn't like this:
VBA Code:
[B]If sh.Name = "Property Numbering", "VO Areas" Then[/B]
How do I correct this please?
Thanks.