Solved

What is the Not Equal sign for VBA?

Posted on 2006-06-27
13
4,120 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

 
LVL 143

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
 

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

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!

Question has a verified solution.

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

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.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

739 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