App.ValidatePassword
The ValidatePassword application function is used to check a password for the currently logged on user. It returns a Boolean value (True or False), depending on whether the password matches the password for the relevant user account.
Syntax |
App.ValidatePassword ( Password ) |
Description |
When executed, the ValidatePassword function compares a defined password to the password for the user account of the currently logged on user. If the password is correct, the ValidatePassword function returns True. If the password is invalid, the ValidatePassword function returns False. |
Arguments |
Password {string} The password for the user account. |
Returns |
Returns a Boolean value. This is True if the password matches the password of the logged on user. If the password does not match, ValidatePassword returns False. |
Example:
- If App.ValidatePassword ( "AYO7AV" ) Then
- ' Do action, e.g. issue control
- Else
- MsgBox "Incorrect password specified.", vbOKOnly+vbExclamation, "Error"
- End If
NOTE: In this example, the ' Do action’ comment indicates the part of the script where you would define the action to be taken, such as issue a control to a point.