I would like to share an excel file that has slicers and charts in it. I want users to be able to use the slicers for filtering and then select and copy the charts. But I want to protect the sheet and prevent any editing of the chart and the slicers.
As far as I can see, the options are to lock the charts and slicers, in which case they are uneditable when the sheet is protected, but then the slicers are frosen and the chart can't be copied (PrintScreen is not an option). OR, to unlock them, in which case they become usable but editable.
Is there a way around this?
Excel – Allow selecting but not editing a chart and slicers in a protected Excel sheet
microsoft excelmicrosoft-excel-2010
Best Answer
You have 2 options. One way is to go for VBA enabled worksheet and add your own logic using VBA, but it requires that your sheet is
xlsm
and the end user must enable macros in your workbook - but this way you get best control over allowed user's actions. The second way is withxlsx
without VBA - but you cannot deny some actions to the user there, like to delete the slicers or change the name of the chart.1) You can do as recommended here:
It means you need to convert your workbook to xlsm, workbook with macros. Then add a macro to handle the clipboard action on the chart click.
2) The better way I think would be that you leave the Chart element unlocked on the protected worksheet and modify its properties with a macro:
or for all charts on a sheet:
This way you use macros when creating the workbook, but the workbook itself does not contain VBA.
If you create a separate sheet for a chart, you can protect it separately with a password:
As for the slicers, you need to leave them unlocked and to check "Use Pivottable Reports" when locking the worksheet.