Delete Protection.AllowEditRanges

M

mangesh_yadav

How should I delete all the ranges in Protection.AllowEditRanges using
VBA. I am not getting the index of each of the items to delete.

Mangesh
 
R

Roderick

Hello!

I do not fully understand what you want to do, but you can enumerat
all AllowEditRanges and then use the Delete-method ....

Dim s As Worksheet
Dim rng As AllowEditRange

Set sh = ActiveSheet

For Each rng In sh.Protection.AllowEditRanges
rng.Delete
Next rng

Ro
 
M

mangesh_yadav

Thanks. I am doing something similar at the moment. My initial proble
was that I was not getting the item nos to delete it. But later on
figured out. Thanks anyway.

Manges
 
Top