M
Memento
Hello Guys, a rather simple thing, yet i don't know why it does not work:
the code asks simply for a password, if the password is correct, perform the
code. Or if the user typed nothing in the inputbox, or pressed Cancel, do
nothing. If the password is wrong, give message "wrong password".
response = InputBox("give password: ") = "abcdefg"
If response = vbNullString Then Exit Sub 'This code should exit the sub if
no typing or pressed on Cancel button
If response = "abcdefg" Then
'Code to execute Else
MsgBox "password incorrect!", vbCritical
End If
this doesn't work as it should, any ideas what's wrong?
Thanks in advance.
the code asks simply for a password, if the password is correct, perform the
code. Or if the user typed nothing in the inputbox, or pressed Cancel, do
nothing. If the password is wrong, give message "wrong password".
response = InputBox("give password: ") = "abcdefg"
If response = vbNullString Then Exit Sub 'This code should exit the sub if
no typing or pressed on Cancel button
If response = "abcdefg" Then
'Code to execute Else
MsgBox "password incorrect!", vbCritical
End If
this doesn't work as it should, any ideas what's wrong?
Thanks in advance.