Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 318
Default unprotect worksheet when......

Hello is it possible to unprotect a worksheet when a certain cell is
selected using VBA . I need to unprotect the worksheet when cell B34 is
selected and remain unprotected.
thanks in advance
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 88
Default unprotect worksheet when......

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Enter this routine in the class module of the sheet you wish to unprotect

If Target.Cells.Count 1 Then
Exit Sub
End If
If Not Application.Intersect(Range("B34"), Target) Is Nothing Then
ActiveSheet.UnProtect
end if
end sub

"Wanna Learn" wrote:

Hello is it possible to unprotect a worksheet when a certain cell is
selected using VBA . I need to unprotect the worksheet when cell B34 is
selected and remain unprotected.
thanks in advance

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
unprotect a worksheet shelly Excel Worksheet Functions 3 December 19th 07 12:37 AM
Unprotect Worksheet. xoom3 Excel Discussion (Misc queries) 4 July 14th 06 10:00 PM
Unprotect a worksheet FRAZZLED New Users to Excel 0 May 30th 06 05:06 PM
Unprotect a worksheet Bryan Excel Discussion (Misc queries) 11 April 14th 06 02:42 AM
Unprotect worksheet via VBA Mike Echo Excel Worksheet Functions 2 March 19th 06 04:52 AM


All times are GMT +1. The time now is 01:23 PM.

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"