Solved

What is the Not Equal sign for VBA?

Posted on 2006-06-27
13
4,112 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
Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

 

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Doc'in system (example?) BA 7 78
Visual xHarbour 1 76
Clipboard Manager for Windows 7 5 41
SpiceWorks - help desk system 2 55
Let’s list some of the technologies that enable smooth teleworking. 
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Viewers will learn how to use the Hootsuite Dashboard.
The viewer will learn how to successfully create a multiboot device using the SARDU utility on Windows 7. Start the SARDU utility: Change the image directory to wherever you store your ISOs, this will prevent you from having 2 copies of an ISO wit…

705 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

16 Experts available now in Live!

Get 1:1 Help Now