Delete Protection.AllowEditRanges

  • Thread starter Thread starter mangesh_yadav
  • Start date Start date
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
 
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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top