Hello,
I have a workbook with a data table and pivot table on a protected worksheet.
I would like the user to refresh the content in the pivot table when then unhide the pivot table content.
Can someone help with this Macro?
I have a workbook with a data table and pivot table on a protected worksheet.
I would like the user to refresh the content in the pivot table when then unhide the pivot table content.
Can someone help with this Macro?
Code:
Sub show_hide()
ActiveSheet.Unprotect Password:="mypassword"
If Range("table_all_range").EntireRow.Hidden = True Then
Range("table_all_range").EntireRow.Hidden = False
Else
Range("table_all_range").EntireRow.Hidden = True
End If
ActiveSheet.Protect Password:="mypassword"
End Sub