+ Reply to Thread
Results 1 to 3 of 3

Issue with Determining when Checkbox is Null

  1. #1
    Registered User
    Join Date
    05-28-2005
    Location
    WI, USA
    MS-Off Ver
    Office XP/2003
    Posts
    95

    Issue with Determining when Checkbox is Null

    Hi,

    I have a routine that set the value of a particular checkbox to "Null." Later on, I'm using an if statement to evalute if the value of the checkbox is NOT false (meaning a null value should pass the logic test). However, whenever this logic is evaluated, it does not pass the test. For example:
    Please Login or Register  to view this content.
    Then later,
    Please Login or Register  to view this content.
    I would expect that when the If statement is evaluated after CommandButton1 has been clicked, Range A1 would say "Test," but it never does... Help?

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229
    Is the TripleState of the checkbox set to True? If not, it can't hold a Null.
    I'd change the first statement to
    Please Login or Register  to view this content.
    You can't test for Null by evaluating the value of a checkbox. You need to use IfNull

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-28-2005
    Location
    WI, USA
    MS-Off Ver
    Office XP/2003
    Posts
    95

    Smile

    Such a simple solution for a problem I spent way too much time trying to fix. Thanks so much; it worked. =)

+ 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