ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Can't protect chartsheets in my workbook (https://www.excelbanter.com/excel-programming/331539-cant-protect-chartsheets-my-workbook.html)

Mark Stephens

Can't protect chartsheets in my workbook
 
I've tried everything but nothing seems to stop the user from being able to
select my chart, nayone know a follproof way of making it impossible to
select a chart on a chartsheet?

Thks, Mark



Greg Wilson

Can't protect chartsheets in my workbook
 
With Charts("Sales Data")
.ProtectSelection = False
'.ProtectSelection = Not .ProtectSelection to toggle
End With

Regards,
Greg

"Mark Stephens" wrote:

I've tried everything but nothing seems to stop the user from being able to
select my chart, nayone know a follproof way of making it impossible to
select a chart on a chartsheet?

Thks, Mark




Greg Wilson

Can't protect chartsheets in my workbook
 
This is not my night. Should have been ProtectSelection = True to protect
(obviously). To toggle is the same.

Regards,
Greg

"Greg Wilson" wrote:

With Charts("Sales Data")
.ProtectSelection = False
'.ProtectSelection = Not .ProtectSelection to toggle
End With

Regards,
Greg

"Mark Stephens" wrote:

I've tried everything but nothing seems to stop the user from being able to
select my chart, nayone know a follproof way of making it impossible to
select a chart on a chartsheet?

Thks, Mark




Mark Stephens[_3_]

Can't protect chartsheets in my workbook
 

Hi Greg,

Thanks for that but does it work for a chart sheet as well as a chart
embedded in a workbook? If so how do you find the name of the chart in
your chartsheet?

Thanks for your help, Mark


*** Sent via Developersdex http://www.developersdex.com ***

Greg Wilson

Can't protect chartsheets in my workbook
 
Just use the name of the chart sheet as listed in the sheet tab. For the code
example, I used "Sales Data". As no doubt you are already aware, you can
change chart sheet names the same way you can worksheet names, by
right-clicking the tab and selecting the Rename option.

Regards,
Greg


"Mark Stephens" wrote:


Hi Greg,

Thanks for that but does it work for a chart sheet as well as a chart
embedded in a workbook? If so how do you find the name of the chart in
your chartsheet?

Thanks for your help, Mark


*** Sent via Developersdex http://www.developersdex.com ***



All times are GMT +1. The time now is 07:33 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com