Consulting

Results 1 to 2 of 2

Thread: Selecting one OptionButton reset the choices in another Group

  1. #1
    VBAX Regular
    Joined
    Jan 2021
    Posts
    46
    Location

    Selecting one OptionButton reset the choices in another Group

    Can someone help me with VBA code for OptionButtons. I have two groups with two choices in each, so in Group 1 i have "OptionButton 1" and "OptionButton 2" and in Group 2 I have "OptionButton 3" and "OptionButton 4". What I need is to reset choices in "Group 2" when "OptionButton 2" is selected. I found VBA code for reseting choices in "Group 2" but I don know how to run that code when "OptionButton 2" is selected. Thanx!

    List1.Shapes("OptionButton 3").ControlFormat.Value = xlOff 
    List1.Shapes("OptionButton 4").ControlFormat.Value = xlOff

  2. #2
    VBAX Regular
    Joined
    Jan 2021
    Posts
    46
    Location
    Ok, I solved it and it was actually easy. Here is my code if anyone need it.
    Sub OptionButtonReset ()
    Set OptBtns = Me.OptionButtons
    List1.Shapes("OptionButton 3").ControlFormat.Value = xlOff
    List1.Shapes("OptionButton 4").ControlFormat.Value = xlOff
    End Sub
    

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •