Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 4144
  • Last Modified:

What is the Not Equal sign for VBA?

Just need to know the not equal to symbol for programming in VBA.

Refering to question - http://www.experts-exchange.com/Applications/Q_21899670.html

the next step is to add an else if statement saying if txtUserID and txt UserPW is not equal to .....

THEN

open formError
0
neelyjer
Asked:
neelyjer
  • 8
  • 4
1 Solution
 
Harisha M GCommented:
<>
0
 
Harisha M GCommented:
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
0
 
neelyjerAuthor Commented:
I'm a jack@$$....


I meant to ask for the unhide function.

I ALREADY HAVE THENOT EQUAL TO!!!!

RAISING POINTS TO 250
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
txtUserID <> value AND  txtPassword <> value

--- or ---

not ( txtUserID = value or  txtPassword = value )
0
 
Harisha M GCommented:
txtUserID.Visible = True
0
 
Harisha M GCommented:
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
0
 
neelyjerAuthor Commented:
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.
0
 
Harisha M GCommented:
So, what is your problem ? :P
0
 
Harisha M GCommented:
If you want to hide another form, put the name of that form instead of Me...

fromLogin.Hide
0
 
neelyjerAuthor Commented:
I need to unhide the form that I was hidden after incorrect userID.  How do I unhide the form?
0
 
Harisha M GCommented:
frmLogin.Show
0
 
neelyjerAuthor Commented:
Perfection.  I'm not a dentist but I think we could've pulled teeth quicker than that.
0
 
Harisha M GCommented:
:)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 8
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now