Divin3
Divin3

Reputation: 548

Excel VBA option button selected as default on start

I am trying to make a preferred non activex radio button to be selected by default when the excel document is opened.

What I was trying to do:

Private Sub Workbook_Open()

ActiveSheet.Shapes("Option Button 1").Value = True

End Sub

But I get this error message:

Run-time error '438':

Object doesn't support this property of method

Upvotes: 2

Views: 24055

Answers (1)

PerpetualStudent
PerpetualStudent

Reputation: 832

Try this:

ActiveSheet.Shapes("Option Button 1").ControlFormat.Value = xlOn

Upvotes: 2

Related Questions