By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,988 Members | 1,493 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,988 IT Pros & Developers. It's quick & easy.

The "And" Function

lee123
100+
P: 556
I have been trying to figure out how to use this function in an "IF" statement

Example:

Expand|Select|Wrap|Line Numbers
  1. IF  label1 And  label2  = "3"  Then
  2.     label4.caption = "1"
  3. else
  4.    label4.caption=""
  5. End IF
I tried something similar to this but got nothing why? is the syntax wrong? If so how would I use this "And" in an statement?

lee123
Nov 25 '07 #1
Share this Question
Share on Google+
2 Replies


YarrOfDoom
Expert 100+
P: 1,247
Expand|Select|Wrap|Line Numbers
  1. IF label1 = "3" And label2 = "3" Then
  2. label4.caption = "1"
  3. else
  4. label4.caption=""
  5. End IF
try this, and if it doesn't work, try adding some brackets

Yarr
Nov 25 '07 #2

lee123
100+
P: 556
that worked thanks for the help:yarrofdoom

lee123
Nov 25 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.