Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Require Password to overide data validation
I would like to require a password for a user to overide data validation in a
cell. For example Cell A5 shows a maximum loan value of $40,000. The user is to enter the actual loan amount in A6, which I have a data validation of not to exceed A5. I would like to have the data validation reject any value of A5 unless the user can enter a password. Is this possible? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Require Password to overide data validation
use the sheet's change event ... I added another sheet, named it
'passwords' and made it xlVeryHidden. I put a password in A1 in you sheet with cell A6 to be checked, leave the datavalidation to handle the amount. go to the sheet's code page (right-click the tab and choose View Code) and paste in this: Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = Range("A6").Address Then If Not PasswordOK Then Application.EnableEvents = False Target = Range("A1") Application.EnableEvents = True End If End If End SubFunction PasswordOK() As Boolean Dim pwd As String pwd = InputBox("Please enter your password") If pwd = Worksheets("passwords").Range("A1").Value Then PasswordOK = True End If End Function just one idea. another would be to check the username from the pc "Jim" wrote in message ... I would like to require a password for a user to overide data validation in a cell. For example Cell A5 shows a maximum loan value of $40,000. The user is to enter the actual loan amount in A6, which I have a data validation of not to exceed A5. I would like to have the data validation reject any value of A5 unless the user can enter a password. Is this possible? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Data Validation- Require Entry in a Field | Excel Discussion (Misc queries) | |||
Require a password to execute a macro | Excel Programming | |||
Require certain password for sheet1 to save | Excel Programming | |||
Require password to execute macro | Excel Programming | |||
require password each time a macro is executed | Excel Programming |