+ Reply to Thread
Results 1 to 9 of 9

Option buttons return true/false rather than 1/2

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Option buttons return true/false rather than 1/2

    Hi all,

    Just a quick one. How to make option buttons return numeric values rather than true and false statement?

    Thanks
    Last edited by ABSTRAKTUS; 08-03-2011 at 06:00 PM.

  2. #2
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Option buttons return true/false rather than 1/2

    Is your question regarding an option button from the VBE or are you talking about ActiveX controls from the sheets side of things?
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

  3. #3
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Option buttons return true/false rather than 1/2

    Hi,

    ActiveX controls

  4. #4
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Option buttons return true/false rather than 1/2

    The following is an example from an option button:
    Please Login or Register  to view this content.
    Is that what you mean? How many option buttons are there?

  5. #5
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Option buttons return true/false rather than 1/2

    I used to have XL 2003 on my PC and option buttons used to give 1 or 2 (checked and unchecked) in the linked cell. I have reinstalled windows on my PC and XL 2003 of course. And now option button is giving me true or false statement in the linked cell. Why?

  6. #6
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Option buttons return true/false rather than 1/2

    I'm not sure why that would have changed. Doesn't it equate to the same thing anyways? I'm pretty sure that FALSE has a numerical value of 0 while TRUE has a numerical value of 1 (or the other way around). I know that doesn't really help but.....

  7. #7
    Forum Expert Colin Legg's Avatar
    Join Date
    03-30-2008
    Location
    UK
    MS-Off Ver
    365
    Posts
    1,256

    Re: Option buttons return true/false rather than 1/2

    Hi,

    Forms controls option buttons give a number (1,2,3 etc) in the linked cell.
    ActiveX controls option buttons give TRUE or FALSE.

    It's always been that way.
    Hope that helps,

    Colin

    RAD Excel Blog

  8. #8
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Re: Option buttons return true/false rather than 1/2

    Thanks Colin for clarifying.

  9. #9
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Option buttons return true/false rather than 1/2

    Thanks! I have mixed them up...

+ 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