Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 107
Default unProtect some cells on the spreadsheet

I have foloing code to let user enter data only in range

dim wsDestination as string

wsDestination = "Mysheet"

Sheets(wsDestination).Select
ActiveSheet.Protection.AllowEditRanges(1).Delete
ActiveSheet.Protection.AllowEditRanges.Add Title:=wsDestination & " Range
" _ & "G12" , Range:=Range("G12:R36" )
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

I have the code in the loop to unprotect cells in the spreadsheets.

It seems that the code only unprotect the first in the loop or unprotect
nothing.

What I did wrong here?
Any information is great appreciated,


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
How do I unprotect a spreadsheet? Sofiya Excel Worksheet Functions 1 October 13th 08 04:30 PM
Cells locking after Protect/Unprotect Geoff Excel Discussion (Misc queries) 2 August 26th 07 10:20 PM
how do I unprotect an excel spreadsheet in beta 2007 Jim Excel Discussion (Misc queries) 1 July 10th 06 08:02 PM
unprotect control button only in spreadsheet pywhacket Excel Worksheet Functions 0 March 21st 06 06:43 PM
How do I unprotect certain cells in a protected sheet? Lee Garrett Excel Worksheet Functions 1 January 26th 06 04:38 AM


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

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

About Us

"It's about Microsoft Excel"