Excel VBA IF function question.
Posted on 2006-06-26
My question is this:
I need to know the correct function for matching multiple criteria before an event takes place. I have the following code:
' If the User name and Password are a manager's Login Then
' Open the Options Label AND include the Add/Remove User Option
If txtLoginID.Value = "Manager" Then
If txtLoginPW.Value = "Password" Then
frmDataOptions.Visible = True
ckbUserAddRemove.Visible = True
frmSubmit.Visible = True
Obviously the line -- If txtLoginID.Value = "Manager" Then -- will cause an error with the line that follows. How do I get those two criteria to be considered before the visible options below it are allowed??