Radio Button Selection on Auto Open

L

LD

I have three radio buttons on a worksheet, and the associated subroutines are
stored in the "directory" associated with that sheet when I go to the macro
directory. Currently when I open the spreadsheet whichever button was
selected on the previous close is the one on. How can I select a button to
be on "upon open" in my auto_open routine?

I tried using a statement "Application.Run "OptionButton1_Click" in my
Auto_Open sub and it couldn't find the sub, even when it was "public". Also
tried moving the button subs to a module directory, but then EXCEL cannot
find them when the radio buttons are clicked.

The crux of this seems to be that some subroutines need to be stored in the
spreadsheets, and others are stored in modules. Guess it is obvious I don't
appreciate why there is a difference. Any enlightenment you can provide
would be appreciated.

Thanks!
Thanks!
 
R

RyanH

This event will run every time your workbook is opened. Replace
"OptionButton1" with the name of the Option Button you wish to have = True
when the workbook is opened.

Private Sub Workbook_Open()

OptionButton1 = True

End Sub

Ryan
 
O

Office_Novice

Ok i got it this time

Private Sub Workbook_Open()
Worksheets(1).OptionButton1 = True
End Sub

you need to tell VBA where the optionbutton is.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top