I have this code to protect all worksheets and enable some formatting.
My problem is that the second tab in the workbook contains graphs and the marco will protect the second tab but stops there. How do I correct this and make the macro run through the whole workbook?
Thanks,
JG
Code:
Sub ProtectSheets()
Dim wsheet As Worksheet
For Each wsheet In Worksheets
wsheet.Select
ActiveSheet.Protect Password:="ABC", AllowFormattingCells:=True, AllowFormattingColumns:=True, AllowFormattingRows:=True
Next wsheet
End Sub
My problem is that the second tab in the workbook contains graphs and the marco will protect the second tab but stops there. How do I correct this and make the macro run through the whole workbook?
Thanks,
JG