G
Gunnar Johansson
Hi,
I thought I had it all set up now, but during testing I cut a chart and it
disapperard! I found that I CAN CUT out the chart! Not to delete, but cut...
Protection now is:
a/ In code I set:
Chart.ProtectData = True
b/ I protect the sheet with:
Sheet1.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
Sheet1..EnableSelection = xlUnlockedCells
Not so big purpose to protect the sourcecode of the charts and not allow to
delete them if the users can cut them, right? Can you please suggest a good
way of protect the charts of the sheet? You had to be able to copy paste
(to ppt or word etc) but not ruin the sourcecode in the charts or delete or
cut them out. (You know since I have code running on worksheet_change the
clipboard get empty and the chart is bye-bye...)
Background: I have a sheet with several charts. I protect them by in code
running a loop like:
For Each chtobj In Sheet1.ChartObjects
chtobj.Chart.ProtectData = True
Next chtobj
I also run other code, showing a splashscreen during the code to run then
opening the sheet and on change etc etc.
I started to write code to have the original charts on a veryhidden sheet
and just paste pictures in this worksheet, but it felt so large and I don't
know how to locate the 16 charts in the right spots in the sheet...
Hopefully you have some smart suggestion for me and I don't need to continue
with that route...
Kind regards
Gunnar
I thought I had it all set up now, but during testing I cut a chart and it
disapperard! I found that I CAN CUT out the chart! Not to delete, but cut...
Protection now is:
a/ In code I set:
Chart.ProtectData = True
b/ I protect the sheet with:
Sheet1.Protect DrawingObjects:=False, Contents:=True, Scenarios:=True
Sheet1..EnableSelection = xlUnlockedCells
Not so big purpose to protect the sourcecode of the charts and not allow to
delete them if the users can cut them, right? Can you please suggest a good
way of protect the charts of the sheet? You had to be able to copy paste
(to ppt or word etc) but not ruin the sourcecode in the charts or delete or
cut them out. (You know since I have code running on worksheet_change the
clipboard get empty and the chart is bye-bye...)
Background: I have a sheet with several charts. I protect them by in code
running a loop like:
For Each chtobj In Sheet1.ChartObjects
chtobj.Chart.ProtectData = True
Next chtobj
I also run other code, showing a splashscreen during the code to run then
opening the sheet and on change etc etc.
I started to write code to have the original charts on a veryhidden sheet
and just paste pictures in this worksheet, but it felt so large and I don't
know how to locate the 16 charts in the right spots in the sheet...
Hopefully you have some smart suggestion for me and I don't need to continue
with that route...
Kind regards
Gunnar