Forum

Dashboard: "use piv...
 
Notifications
Clear all

Dashboard: "use pivot table" disables with macro

3 Posts
2 Users
0 Reactions
71 Views
(@jtucher)
Posts: 4
Active Member
Topic starter
 

 Hello, and thanks in advance for any/all help and/or advice!  I have attached my dashboard. I am currently struggling with the protection feature. I have included a "click here" button with a macro for other users to refresh the data.  Within the macro, I wish to include the commands to unprotect and re-protect (with password).  Each time I try, when it re-protects it disables the slicers because the use pivot table and pivot chart and use auto filters become unchecked.   I am struggling with the correct wording/command (If/Then) to use to allow "use pivot table & pivot chart" and "Use auto filters".  (All information included is fake--no personal or company information is being shared).  I look forward to opinions and guidance.  Thank you! 

 
Posted : 29/12/2020 11:55 am
(@debaser)
Posts: 837
Member Moderator
 

You can specify those as arguments for the protect command:

 

Sheet1.Protect Password:="password here", AllowFiltering:=True, AllowUsingPivotTables:=True

 
Posted : 30/12/2020 6:15 am
(@jtucher)
Posts: 4
Active Member
Topic starter
 

That did it -- thank you so much!

 
Posted : 30/12/2020 10:10 am
Share: