tlc53
Active Member
- Joined
- Jul 26, 2018
- Messages
- 399
Hi there,
I currently have a Combo Box that when a name is selected from the dropdown option, a password is requested. If the correct password is entered (12345) the date will be entered in the corresponding cell.
However, it is not quite working right. Currently it is one password for all. If I select Sarah Bing enter password, the date is added but then if I select John Doe, cancel/don't enter password, if will leave the date from the first selection but the name will change to John Doe. Thus, making it look like John Doe was responsible for entering the date when really is was Sarah Bing.
Here's an example of the dropdown options;
Please Select
Sarah Bing
John Doe
Mary Jane
I would like Please Select to be the default name, especially when a password is not entered.
I would like each user/name to have their own password
Instead of the corresponding cell just entering the date, I would like the user initials plus date. Eg. SB 20/11/18
Here's the code that I currently have;
Sub PutDateWithPW()
If Application.InputBox("Enter Password to Authorise Accounts", Default:="") = "12345" Then
Range("Q7").Value = Date
End If
'With ActiveSheet.Shapes(Application.Caller).ControlFormat
' .Value = IIf(.Value = xlON, xlOff, xlOn)
'End With
End Sub
Sub PutDateWithPW1()
If Application.InputBox("Enter Password to Authorise Accounts", Default:="") = "12345" Then
Range("Q8:Q9").Value = Date
End If
'With ActiveSheet.Shapes(Application.Caller).ControlFormat
' .Value = IIf(.Value = xlON, xlOff, xlOn)
'End With
End Sub
What I am trying to achieve is for the sheet to be marked with who is authorising the work/spreadsheet and for it to be protected against unauthorised changes.
Hopefully someone can help. Thanks for your time!
I currently have a Combo Box that when a name is selected from the dropdown option, a password is requested. If the correct password is entered (12345) the date will be entered in the corresponding cell.
However, it is not quite working right. Currently it is one password for all. If I select Sarah Bing enter password, the date is added but then if I select John Doe, cancel/don't enter password, if will leave the date from the first selection but the name will change to John Doe. Thus, making it look like John Doe was responsible for entering the date when really is was Sarah Bing.
Here's an example of the dropdown options;
Please Select
Sarah Bing
John Doe
Mary Jane
I would like Please Select to be the default name, especially when a password is not entered.
I would like each user/name to have their own password
Instead of the corresponding cell just entering the date, I would like the user initials plus date. Eg. SB 20/11/18
Here's the code that I currently have;
Sub PutDateWithPW()
If Application.InputBox("Enter Password to Authorise Accounts", Default:="") = "12345" Then
Range("Q7").Value = Date
End If
'With ActiveSheet.Shapes(Application.Caller).ControlFormat
' .Value = IIf(.Value = xlON, xlOff, xlOn)
'End With
End Sub
Sub PutDateWithPW1()
If Application.InputBox("Enter Password to Authorise Accounts", Default:="") = "12345" Then
Range("Q8:Q9").Value = Date
End If
'With ActiveSheet.Shapes(Application.Caller).ControlFormat
' .Value = IIf(.Value = xlON, xlOff, xlOn)
'End With
End Sub
What I am trying to achieve is for the sheet to be marked with who is authorising the work/spreadsheet and for it to be protected against unauthorised changes.
Hopefully someone can help. Thanks for your time!