Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default Protection to add a line to Remove "Select Locked Cells" ???

Sub protect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.protect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Sub Unprotect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.Unprotect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Can i add a line of code to remove the TICK from "Select Locked Cells" ???

How?
Corey....


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Protection to add a line to Remove "Select Locked Cells" ???

Hi Coery,

Try this:

wks.Unprotect Password:="1234"
wks.EnableSelection = xlUnlockedCells

Thanks


Corey wrote:
Sub protect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.protect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Sub Unprotect()
Application.ScreenUpdating = False
Dim wks As Worksheet
For Each wks In ThisWorkbook.Worksheets
wks.Unprotect Password:="1234"
Next wks
Application.ScreenUpdating = True
End Sub


Can i add a line of code to remove the TICK from "Select Locked Cells" ???

How?
Corey....


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
Protect sheet unchecking "Select locked cells" has undesiredresults wal Excel Discussion (Misc queries) 1 September 1st 08 03:28 PM
How do you select line or columns in "Line-Column on 2 axes" graphs? mizterbusy Excel Discussion (Misc queries) 0 September 19th 06 06:48 AM
Something "Odd", Sheet Protection, Locked Cells Neal Zimm Excel Programming 0 July 20th 06 01:18 PM
Protect shouldn't default to "allow users to select locked cells" JudiMicro Setting up and Configuration of Excel 0 November 18th 05 05:00 PM
Using "Cells" to write "Range("A:A,H:H").Select" Trip Ives[_2_] Excel Programming 3 June 5th 04 03:13 PM


All times are GMT +1. The time now is 05:38 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"