0

I have 6 option buttons (form control). They are used for searching columns on a table below on the same worksheet. I have a basic search bar. I'd like to create a RESET button where it will reset the column filters and select a specific/default option button. These buttons are (Form Control) because the code I use for the search Macro was only working that way.

Private Sub cmd_RESET_BASIC_Click()
'PURPOSE: MANUAL FILTER RESET

ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=2
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=4
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=5
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=8
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=25
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=24
ActiveSheet.Shapes.Range(Array("Option Button 5")).Select

End Sub

I tried Recording a macro since I am new.

How can I Select Option Button 5 and make it true and having the others false?

1
  • 1
    Probably: ActiveSheet.Optionbuttons("Option Button 5").Value=True Commented Nov 15, 2018 at 16:01

1 Answer 1

1

ActiveSheet.OptionButtons("Option Button 5").Value = True

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.