Name
chart.Protect([Password], [DrawingObjects], [Contents], [Scenarios], [UserInterfaceOnly])
Synopsis
The Protect method provides fewer arguments for the Chart object than for the Worksheet object.
|
Argument |
Settings |
|---|---|
|
|
The password required to unprotect the chart. |
|
|
True protects Shape objects drawn on the chart; False does not protect. Default is True. |
|
|
True protects the chart. Default is True. |
|
|
This argument is ignored for charts. |
|
|
True protects the chart from changes made through the Excel interface, but allows macros to make changes to protected items; False applies the protection to both types of changes. Default is False. |
The following code protects a chart with a password:
Set chrt = ThisWorkbook.Sheets("Protected Chart")
chrt.Protect "Excel2003"Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access