Results 1 to 2 of 2

Thread: Lock everything but slicer buttons

  1. #1

    Question Lock everything but slicer buttons

    Register for a FREE account, and/
    or Log in to avoid these ads!

    I have designed a dashboard for a client in Excel 2010 with Powerpivot.
    It is supposed to provide the client with analytical data when using the slicer buttons to filter relevant data.
    The thing is I don't want the client's end user to mess up the dashboard if they accidently hit anything else than the slicer buttons.
    I have tried to lock the worksheet but that eliminates the possibility to make the sheet refresh the data when the slicer buttons are pressed.
    Does anyone know how to work around this? I have tried the different checkmarks under the 'lock worksheet' section.
    Thanx in advance.

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Nanaimo, BC, Canada
    Blog Entries
    Excel Version
    Excel Office 365 Insider
    Hi there, and welcome to the forum.

    The challenge here is that in order to unprotect the worksheet to allow the pivot table to refresh, the only way I can find to do it is to do the following:
    • Set all connections to not persist
    • Rely on the Workbook_PivotTableOpenConnection event to unprotect to pivottable sheet
    • Reprotect the worksheet using the Worksheet_PivotTableUpdate event
    The challenge here is that by not persisting the connection, the workbook has to reconnect and refresh everything each time the slicer button is clicked. For PowerPivot files, this can add minutes, and they're bad enough as is.

    My suggestion would be to put all your Pivots on a separate worksheet, and protect only the dashboard worksheet. You can then hide the pivot sheets, and that should hopefully provide sufficient protection.

    (Just as a note, in order to enable slicers on a protected sheet, you need to protect the worksheet and declare DrawingObjects:=False)
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book Master Your Data for Excel and Power BI, or our new Power Query Recipe cards!

    Main Site: -||- Blog: -||- Forums:
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts