Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to lock to file if the value of cell is outside its limit
value. Then the person using the file would have to call in and get help. -- Francis X. Boudreaux |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One way:
Assuming the limit is 0 < A1 < 100: Private Sub Worksheet_Calculate() Const PWORD As String = "drowssap" Dim bValid As Boolean With Range("A1") If IsNumeric(.Value) Then _ If .Value 0 Then _ If .Value < 100 Then _ bValid = True End With If Not bValid Then Me.Unprotect PWORD Me.Cells.Locked = True Me.Protect PWORD MsgBox "A1 is out of range. Call home." End If End Sub This can be modified if more than one sheet needs to be locked down. However, be aware that worksheet protection is extremely weak. A motivated user with enough skill to find this newsgroup can figure out how to bypass it. In article , "FX Boudreaux" wrote: I would like to lock to file if the value of cell is outside its limit value. Then the person using the file would have to call in and get help. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need to run a Macro from a cell value if the cell value is greater
then 42. If the number is 43 and above, I need to lock close the sheet. *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Locking a file | Excel Discussion (Misc queries) | |||
Excel file keeps locking - Strange problem | Excel Discussion (Misc queries) | |||
row locking, instead of file locking? | Excel Discussion (Misc queries) | |||
Locking linked file location in a formula | Excel Discussion (Misc queries) | |||
excel 2007 file locking | Excel Discussion (Misc queries) |