Solved

What is the Not Equal sign for VBA?

Posted on 2006-06-27
13
4,113 Views
Last Modified: 2008-01-09
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
Comment
Question by:neelyjer
  • 8
  • 4
13 Comments
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995717
<>
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995728
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
 

Author Comment

by:neelyjer
ID: 16995732
I'm a jack@$$....


I meant to ask for the unhide function.

I ALREADY HAVE THENOT EQUAL TO!!!!

RAISING POINTS TO 250
0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 16995736
txtUserID <> value AND  txtPassword <> value

--- or ---

not ( txtUserID = value or  txtPassword = value )
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995768
txtUserID.Visible = True
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995778
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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

Author Comment

by:neelyjer
ID: 16995787
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
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995814
So, what is your problem ? :P
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995831
If you want to hide another form, put the name of that form instead of Me...

fromLogin.Hide
0
 

Author Comment

by:neelyjer
ID: 16995851
I need to unhide the form that I was hidden after incorrect userID.  How do I unhide the form?
0
 
LVL 37

Accepted Solution

by:
Harisha M G earned 300 total points
ID: 16995864
frmLogin.Show
0
 

Author Comment

by:neelyjer
ID: 16995884
Perfection.  I'm not a dentist but I think we could've pulled teeth quicker than that.
0
 
LVL 37

Expert Comment

by:Harisha M G
ID: 16995902
:)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I previously wrote an article addressing the use of UBCD4WIN and SARDU. All are great, but I have always been an advocate of SARDU. Recently it was suggested that I go back and take a look at Easy2Boot in comparison.
This article describes how to use the timestamp of existing data in a database to allow Tableau to calculate the prior work day instead of relying on case statements or if statements to calculate the days of the week.
The viewer will learn common shortcuts with easy ways to remember them. The viewer will then learn where to find all of the keyboard shortcuts, how to create/change them, and how to speed up their workflow.
An overview on how to enroll an hourly employee into the employee database and how to give them access into the clock in terminal.

930 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now