Results 1 to 3 of 3
  1. #1

    VB if conditions

    How would I add more than one condition inside an if statement?
    I need to check that 3 Boolean variables are true to continue... Something like

    Code:
    if bln_one & bln_two & bln three = true then
    
    execute code

  2. #2
    Join Date
    May 2009
    Posts
    766
    I don't know the specific VB syntax, but conceptually, you would need to compare each variable against boolean true, and join them with logical ANDs.

    Ie,

    PHP Code:
    if (condition1 && condition2 && condition3then ... 
    where each condition is something like bin_one = true, etc.

    I don't know what syntax VB uses for a logical AND, but it's a double-ampersand in most languages.

  3. #3
    I got it, nevermind....by the way the sytax for VB is as follows:

    Code:
    if (condition1 and condition2 and condition3 = true) then
    
    execute
    just the word and, no "&"
    Last edited by hopesfall; 09-24-2009 at 11:36 PM.

Similar Threads

  1. Terms and Conditions
    By danisgood in forum Running a Web Hosting Business
    Replies: 3
    Last Post: 07-25-2009, 04:10 PM
  2. Need help with conditions in php
    By praxedis in forum Programming Discussion
    Replies: 2
    Last Post: 05-10-2005, 03:04 PM
  3. Terms and conditions
    By chrisblack in forum Other Offers & Requests
    Replies: 3
    Last Post: 09-16-2003, 12:27 AM
  4. Will sell if the conditions are right
    By SellHostCo in forum Other Offers & Requests
    Replies: 1
    Last Post: 08-29-2003, 10:57 AM
  5. Terms and conditions
    By PaulH in forum Running a Web Hosting Business
    Replies: 3
    Last Post: 09-07-2002, 08:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •