Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
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
How do you password protect a single cell or column of cells Kinnaird New Users to Excel 3 June 19th 12 06:33 PM
password protect a single sheet Brian Excel Discussion (Misc queries) 4 September 16th 08 08:19 PM
password protect a single sheet Stefi Excel Discussion (Misc queries) 0 March 28th 07 01:52 AM
password protect a single sheet Stefi Excel Discussion (Misc queries) 0 March 28th 07 01:02 AM
password protect a single sheet stumac Excel Discussion (Misc queries) 0 March 28th 07 12:12 AM


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