Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default How to delete allowEditRanges programatically

I am using the AllowEdit Option in a worksheet for making some rows editable.
I am giving the range starting from Column 'A' to Column 'IV'. Now I am using
a logic for clearing the alloweditranges created previously which is given
below:

Set oSheet = ActiveWorkbook.Sheets("Sheet1")
iRangeCount = oSheet.Protection.AllowEditRanges.Count
oSheet.Unprotect

For iIndex = 0 To iRangeCount
oSheet.Protection.AllowEditRanges(iIndex).Delete
Next

This logic works without any error but the allowEditRanges Count remains the
same. In the WorkSheet the ranges which were given allowedit previously
remains as given. I want to know whether there is any solution for clearing
the ranges given for allowedits programatically.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Code Modules Programatically blatham Excel Discussion (Misc queries) 1 February 3rd 06 05:38 PM
How can I programatically identify and delete an image? Henry Stock Excel Programming 2 February 22nd 05 07:21 PM
Delete Protection.AllowEditRanges mangesh_yadav[_87_] Excel Programming 2 September 6th 04 02:47 PM
Set dropdown programatically Bura Tino Excel Programming 5 April 19th 04 11:04 PM
Programatically set ref to my DLL ricks Excel Programming 2 April 13th 04 03:08 PM


All times are GMT +1. The time now is 06:31 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"