C
Chua
I use InputBox to display a simple dialog box so that User can enter
information to be used in a macro. The dialog box has an OK button and a
Cancel button. How do I activate the Cancel button to perform the function
that I want?
I tried below code but it will do nothing and exit the program even when
User click the OK button.
a = InputBox ("Enter Password to Proceed:")
If vbCancel = True Then
Do nothing
End If
If a <> "12345" Then
MsgBox "INVALID PASSWORD !!!" & vbNewLine & "You have no administrator
rights to access the function.", vbCritical
End
End If
information to be used in a macro. The dialog box has an OK button and a
Cancel button. How do I activate the Cancel button to perform the function
that I want?
I tried below code but it will do nothing and exit the program even when
User click the OK button.
a = InputBox ("Enter Password to Proceed:")
If vbCancel = True Then
Do nothing
End If
If a <> "12345" Then
MsgBox "INVALID PASSWORD !!!" & vbNewLine & "You have no administrator
rights to access the function.", vbCritical
End
End If