MaxxFusion
Board Regular
- Joined
- Sep 11, 2014
- Messages
- 51
I use a vba script to lock all my sheets in one click. I also have a vba script that updates my pivot chart automatically when i change my data.
The issue i have now is when i use the vba script to lock my sheets the chart wont update. If i try to update the table manually i get an error becuase the sheets are locked.
How can i get around this?
Here is the vba code i use to lock the sheets.
The issue i have now is when i use the vba script to lock my sheets the chart wont update. If i try to update the table manually i get an error becuase the sheets are locked.
How can i get around this?
Here is the vba code i use to lock the sheets.
VBA Code:
Sub protectsheets()
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
ActiveSheet.EnableSelection = xlUnlockedCells
wsheet.Protect Password:="xxxxxxxx", AllowUsingPivotTables:=True
Next wsheet
End Sub