Results 1 to 3 of 3

Thread: In

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    In

    Hi All:
    Is there a similar function to Inlist(). I have 5 variables that I need to compare of values to. Instead of saying if var1='Data1' or var1='Data2' or Var1='Data3' or var='Data4' or var1='Data5'

    What I want to do is something like this:
    If var1 inlist('Data1','Data2','Data3','Data4','Data5') Then

    Thanks
    Zus

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974
    There's no direct built-in function for that, but there is a nice alternative:
    VB Code:
    1. Select case var1
    2. Case "Data1", "Data2", "Data3", "Data4", "Data5"
    3.    'match - code here
    4. End Select

  3. #3

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    Cleveland,Oh
    Posts
    95

    resolved:IF

    Thanks si_the_geek
    Zus

Posting Permissions

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



Click Here to Expand Forum to Full Width