ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Delete Protection.AllowEditRanges (https://www.excelbanter.com/excel-programming/309092-delete-protection-alloweditranges.html)

mangesh_yadav[_87_]

Delete Protection.AllowEditRanges
 
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


---
Message posted from http://www.ExcelForum.com/


Roderick[_5_]

Delete Protection.AllowEditRanges
 
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

--
Message posted from http://www.ExcelForum.com


mangesh_yadav[_99_]

Delete Protection.AllowEditRanges
 
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

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 01:02 AM.

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