neelyjer
asked on
What is the Not Equal sign for VBA?
Just need to know the not equal to symbol for programming in VBA.
Refering to question - https://www.experts-exchange.com/questions/21899670/Excel-VBA-IF-function-question.html
the next step is to add an else if statement saying if txtUserID and txt UserPW is not equal to .....
THEN
open formError
Refering to question - https://www.experts-exchange.com/questions/21899670/Excel-VBA-IF-function-question.html
the next step is to add an else if statement saying if txtUserID and txt UserPW is not equal to .....
THEN
open formError
<>
neelyjer, you don't need to have ElseIf, instead, have Else
If(txtUserID = "Manager"...) Then
' Do something
ElseIf(txtUserID = "User"...) Then
' Do something else
Else
' Invalid username/password combination
End If
If(txtUserID = "Manager"...) Then
' Do something
ElseIf(txtUserID = "User"...) Then
' Do something else
Else
' Invalid username/password combination
End If
ASKER
I'm a jack@$$....
I meant to ask for the unhide function.
I ALREADY HAVE THENOT EQUAL TO!!!!
RAISING POINTS TO 250
I meant to ask for the unhide function.
I ALREADY HAVE THENOT EQUAL TO!!!!
RAISING POINTS TO 250
txtUserID <> value AND txtPassword <> value
--- or ---
not ( txtUserID = value or txtPassword = value )
--- or ---
not ( txtUserID = value or txtPassword = value )
txtUserID.Visible = True
Did I understand it properly ? What do you want to unhide ?
If you are asking to close the form after clicking Cancel,
Me.Hide will do
If you are asking to close the form after clicking Cancel,
Me.Hide will do
ASKER
Harish,
After entering an incorrect username and/or PW a the login for is hidden and a form opens displaying an error message. After clicking OK on the error message, I am closing the error form - Unload Me - and unhiding the login form.
After entering an incorrect username and/or PW a the login for is hidden and a form opens displaying an error message. After clicking OK on the error message, I am closing the error form - Unload Me - and unhiding the login form.
So, what is your problem ? :P
If you want to hide another form, put the name of that form instead of Me...
fromLogin.Hide
fromLogin.Hide
ASKER
I need to unhide the form that I was hidden after incorrect userID. How do I unhide the form?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfection. I'm not a dentist but I think we could've pulled teeth quicker than that.
:)