Name

chart.ProtectSelection [= setting]

Synopsis

Sets or returns whether or not the user can select items on the chart. This setting operates independent of the other protection settings. The following code prevents the user from selecting items on the chart and thus prevents changes:

    Set chrt = ThisWorkbook.Sheets("Protected Chart")
    chrt.ProtectSelection = True

Get Programming Excel with VBA and .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.