+ Reply to Thread
Results 1 to 3 of 3

Basic 'or', 'and', 'not' Question

  1. #1
    Forum Contributor
    Join Date
    06-03-2008
    Posts
    387

    Basic 'or', 'and', 'not' Question

    I've tried to search for the correct syntax to write in VBA using the functions, 'or', 'and', and 'not', but they're too common of words to find what I want.

    In Excel, I'd write:

    Please Login or Register  to view this content.
    How do I write this in VBA?

  2. #2
    Valued Forum Contributor Shijesh Kumar's Avatar
    Join Date
    05-26-2008
    Location
    Bangalore / India
    MS-Off Ver
    2000
    Posts
    717
    Syntax:

    if a=1 and b=1 then
    do this
    end if

    if a=1 or b = 1 then
    do this
    end if

  3. #3
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,434
    Please Login or Register  to view this content.
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1