Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password in a single cell
Hello all
I have 2 cells. In the first one I input the actual value and at the second one i input the estimated one. However i want to have a password if the estimated value is less than 80% of the actual. If it is more than 80% then i would like to proceed as it is but if is less i would like to have a password before i proceed. Could you please help me with this one? Thanks in advance AngelikiS |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Password in a single cell
Private Sub Worksheet_Change(ByVal Target As Range)
Dim pwd as String If Target.Count 1 Then Exit Sub On Error goto ErrHandler If Target.Address = "$B$1" Then if Target.Value <= Range("A1") * 0.80 then pwd = InputBox "What is the password?" if lcase(pwd) < "abcd" then Application.EnableEvents = False Target.ClearContents msgbox "Must be Greater than " & .8 * Range("A1") end if End If End If ErrHandler: Application.EnableEvents = True End Sub Right click on the sheet tab and select view code. Paste in code similar to the above. -- Regards, Tom Ogilvy "Angeliki" wrote in message ... Hello all I have 2 cells. In the first one I input the actual value and at the second one i input the estimated one. However i want to have a password if the estimated value is less than 80% of the actual. If it is more than 80% then i would like to proceed as it is but if is less i would like to have a password before i proceed. Could you please help me with this one? Thanks in advance AngelikiS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you password protect a single cell or column of cells | New Users to Excel | |||
password protect a single sheet | Excel Discussion (Misc queries) | |||
password protect a single sheet | Excel Discussion (Misc queries) | |||
password protect a single sheet | Excel Discussion (Misc queries) | |||
password protect a single sheet | Excel Discussion (Misc queries) |