+ Reply to Thread
Results 1 to 4 of 4

Hide option buttons based on other option button

  1. #1
    Registered User
    Join Date
    03-04-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    2

    Hide option buttons based on other option button

    i have option buttons 1 and 2 inside a group box


    I need: if option button 1 is true, then option button 3 is visible. If option button 2 is true, then option button 3 is hidden.

    I tried this code but i dont remember vba much

    Sub OptionButton1_Click()
    If OptionButton1.Value = True Then
    Shapes("Option Button 3").Visible = True
    ElseIf OptionButton1.Value = False Then
    Shapes("Option Button 3").Visible = False

    End If
    End Sub

    any help would be greatly appreciated

  2. #2
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide option buttons based on other option button

    Try add sheet reference before
    Please Login or Register  to view this content.
    < ----- Please click the little star * next to add reputation if my post helps you
    Visit Forum : From Here

  3. #3
    Registered User
    Join Date
    03-04-2013
    Location
    mexico
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Hide option buttons based on other option button

    thanks yasserkhalil, even though i added the sheet reference, it is still not working, option button 3 does not dissappear when option button 2 is selected.

    option buttons 1 and 2 are in a group box, so only one of them can be selected at the same time.

    what am i missing?

  4. #4
    Forum Expert
    Join Date
    04-23-2009
    Location
    Matrouh, Egypt
    MS-Off Ver
    Excel 2013
    Posts
    6,882

    Re: Hide option buttons based on other option button

    Try this code
    Please Login or Register  to view this content.

+ 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. [SOLVED] Show/Hide Option Buttons based on previous selections
    By PHP_Idiot in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-24-2016, 09:10 AM
  2. [SOLVED] Hide Option Button based on Linked Cell Value
    By slinn727 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-21-2015, 01:41 PM
  3. [SOLVED] Textbox and Option Buttons - If Textbox has a Value then an Option Button must be selected
    By MeerkatMatt in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-08-2014, 07:45 AM
  4. [SOLVED] Multiple option buttons - Need VBA to disable second group of option buttns based on respo
    By ex123 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 06-19-2013, 03:30 AM
  5. [SOLVED] Disabling an Entire Frame with Option Buttons if other Option Buttons are not clicked.
    By e4excel in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-20-2012, 04:07 AM
  6. Userform Option Button to Show/Hide Another Option Button on same Userform
    By R_S_6 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-26-2010, 09:44 AM
  7. Replies: 2
    Last Post: 03-27-2007, 08:30 AM

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