ChartObjects(1).Chart.ProtectSelection = FalseĪs for the slicers, you need to leave them unlocked and to check "Use Pivottable Reports" when locking the worksheet. Protect Password:="pwd", DrawingObjects:=True, Contents:=True If you create a separate sheet for a chart, you can protect it separately with a password: Sub macro() This way you use macros when creating the workbook, but the workbook itself does not contain VBA. It’s easy enough just add a new column (C) and insert a formula that only displays the Year-Month from the date column: Now you can refresh your PivotTable and go ahead and add a Slicer for the new Field (tip: you don't. Or for all charts on a sheet: For Each i In ActiveSheet.ChartObjects Since Excel won’t allow you to combine fields into one Slicer the solution is to DIY in the source data. Then add a macro to handle the clipboard action on the chart click.Ģ) 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: Sub macro() It means you need to convert your workbook to xlsm, workbook with macros. You can now paste this into another application.") The second way is with xlsx without VBA - but you cannot deny some actions to the user there, like to delete the slicers or change the name of the chart.ġ) You can do as recommended here: Private Sub Chart1_Click() 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.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |