+ Reply to Thread
Results 1 to 3 of 3

OptionButton Value always True

  1. #1
    Registered User
    Join Date
    09-24-2018
    Location
    Sacramento, California
    MS-Off Ver
    2013
    Posts
    11

    OptionButton Value always True

    All,

    I'm adding an OptionButton to a sheet. When I click on it, I want to toggle the value. However, the value is always returned as True/1 regardless of it's initial value. What am I doing wrong?

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,481

    Re: OptionButton Value always True

    If you only have 1 option button then this will not work.
    The control toggles it's own state from False to True when clicked. So when your code reads the state is now True but you then make it false.

    Consider using checkbox instead.
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-24-2018
    Location
    Sacramento, California
    MS-Off Ver
    2013
    Posts
    11

    Re: OptionButton Value always True

    Andy,

    Thanks! Explains why I couldn't get this to work. I'll work on checkboxes.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Optionbutton
    By serenitylai in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2017, 07:45 AM
  2. changing optionbutton.value if = true to have result "1" in cell
    By Ceeseven in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-05-2013, 07:34 PM
  3. OptionButton
    By diono in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2008, 08:02 AM
  4. optionbutton
    By northernstar197 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 05-13-2007, 11:53 AM
  5. Change optionbutton to true for good
    By Mike Archer in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2006, 10:40 AM
  6. [SOLVED] for each optionbutton
    By masterphilch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-21-2005, 01:05 PM
  7. optionbutton
    By benb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2005, 05:06 PM

Tags for this Thread

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