Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default msgbox if cell is locked


I should know this by now, but can't get it right. how do i display
msgbox if the user tries to click into a locked cell on a protecte
sheet?
thanks

--
scottnshell
-----------------------------------------------------------------------
scottnshelly's Profile: http://www.excelforum.com/member.php...nfo&userid=730
View this thread: http://www.excelforum.com/showthread.php?threadid=27430

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default msgbox if cell is locked

There is also a way that you can't select locked cells but you want a msgbox

Try this in the sheet module

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim cell As Range
Dim Ltrue As Boolean
For Each cell In Target
If cell.Locked Then Ltrue = True
Next
If Ltrue = True Then MsgBox "one or more cells in the selection are locked"
End Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl


"scottnshelly" wrote in message ...

I should know this by now, but can't get it right. how do i display a
msgbox if the user tries to click into a locked cell on a protected
sheet?
thanks.


--
scottnshelly
------------------------------------------------------------------------
scottnshelly's Profile: http://www.excelforum.com/member.php...fo&userid=7301
View this thread: http://www.excelforum.com/showthread...hreadid=274303



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
Locked worksheet & hyperlinks (w/ select locked cells unchecked) dgold82 Excel Discussion (Misc queries) 1 July 10th 09 09:42 PM
locked cell not locked Wanna Learn Excel Discussion (Misc queries) 1 December 17th 08 06:01 PM
msgBox after update a cell Claudio Silva Excel Discussion (Misc queries) 10 January 19th 07 10:22 AM
send value to a cell instead on MsgBox morry[_18_] Excel Programming 2 June 10th 04 07:59 PM
How to put the value form cell into the msgbox Jacek Excel Programming 3 May 30th 04 11:33 PM


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