+ Reply to Thread
Results 1 to 3 of 3

VB Variables/Data Types

  1. #1
    Registered User
    Join Date
    10-30-2012
    Location
    England
    MS-Off Ver
    Excel 2010
    Posts
    44

    VB Variables/Data Types

    Hello a quick question
    I have an excell cell that can only take two values ("YES,"NO")-Data validation Rules

    A subroutine in VB reads this value and decides accordingly

    How can I declare a value in VB that takes only two values ("YES","NO")
    Can I declare a list

    At the time being I have declare this value a STRING (but it seems a waste of space)

    Regards
    Dora

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: VB Variables/Data Types

    you can't-you have to declare as string and test the values.
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: VB Variables/Data Types

    Are you sure you need a variable

    Can't you just test the value directly?

+ 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