FragaGeddon
Board Regular
- Joined
- Mar 24, 2005
- Messages
- 137
I'm using a code in my sheets to hide certain columns. With the formula I'd also like to have the ability for the user to format columns.
Even if I protect the sheet manually, the next time the code is activated, it only allows 'Select Unlocked Sheets'.
Here's a part of my VBA code.
Even if I protect the sheet manually, the next time the code is activated, it only allows 'Select Unlocked Sheets'.
Here's a part of my VBA code.
Code:
If Target.Address = "$B$3" Then
If Target.Value <> "" Then blHide = False
For Each ws In ThisWorkbook.Worksheets
If ws.Name <> "Blank" Then 'Sheets to exclude
ws.Unprotect ("password")
ws.Columns("C:D").Hidden = blHide 'Hide Columns
ws.Protect ("password")
End If
Next
End If