View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Mike[_96_] Mike[_96_] is offline
external usenet poster
 
Posts: 18
Default How to prevent user selecting chart

Hi All,

XL 2K Sp3

I have a sheet with several charts on it, that I want to prevent the user
from being able to select the charts (I don't want the chart to be copied as
a chart, as it seems to cause problems)

I set the .protectselection (and .protectformatting, .protectdata, and the
charts' parent chartobject.protectchartobject) properties of my charts to
true and I protect the sheet they are embedded on with drawingobjects:=true.
But, because I am doing some event handling on these charts I need to set
the charts' locked property = false, or else the mouse click events don't
happen.

The problem, if I hold the shift or ctrl button down and then click on the
chart, no event fires, and I am able to select it and can ctrl-c copy it.
I can prevent it by changing the .locked = false to be .locked =true, but
then the charts' mouse click events do not happen. is there a way to catch
or prevent this?

TIA,

Mike.