Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
LD LD is offline
external usenet poster
 
Posts: 10
Default Radio Button Selection on Auto Open

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!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Radio Button Selection on Auto Open

WorkBook_Open()
OptionButton1=true

"LD" wrote:

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!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Radio Button Selection on Auto Open

Scratch that i am haveing the same issue.

"Office_Novice" wrote:

WorkBook_Open()
OptionButton1=true

"LD" wrote:

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!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 586
Default Radio Button Selection on Auto Open

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


"LD" wrote:

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!

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 245
Default Radio Button Selection on Auto Open

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.

"RyanH" wrote:

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


"LD" wrote:

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!



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple radio button selection zak Excel Discussion (Misc queries) 3 January 20th 09 02:46 PM
Initializing a radio button on worksheet open event [email protected] Excel Programming 5 May 3rd 07 05:55 PM
how do I link radio button selection to another page Sharon Excel Worksheet Functions 0 April 27th 05 09:29 PM
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True Mcasteel Excel Worksheet Functions 2 October 29th 04 07:06 PM
Radio Button Selection in UserForms Big Chris[_32_] Excel Programming 3 February 5th 04 12:26 PM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"