tony.reynolds
Board Regular
- Joined
- Jul 8, 2010
- Messages
- 97
I have below code that works ok but if i run it twice it seems to toggle protect and unprotect.... leaving the workbook unprotected....!
Is there a way i can stop this?
Is there a way i can stop this?
Code:
Sub HideChart()
ActiveWorkbook.Unprotect (1234)
Sheets("Chart").Visible = False
ActiveWorkbook.Protect (1234)
End Sub