Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi - I have two radio buttons the code for which sits in the sheets
"code area" (as opposed to module'n'. The two buttons are linked such that only one can be "filled in", I am trying to trap an error that occurs later on when one of the radio buttons is clicked and under certain conditions. Rather than the 2nd radio button being "filled in" I wan the existing button keeps it's "filled in" value. I have created code which changes the values of the buttons to what I want them to be when the error occurs. My problem is that as the code is on the worksheet code area, I can't see how the code can be called from my module1 procedure??? The code is: '1st button is clicked and it does.. things Private Sub OptionButton1_Click() 'Sheets("admin").Select Range("A1").Value = 1 'Sheets("Detail").Select ' Module 1 code that does a pile of things Call make_formula End Sub ' Changes values of buttons Sub reset_buttons_on_error() OptionButton2.Value = False OptionButton1.Value = True End Sub 'What happens when 2nd button is clicked Private Sub OptionButton2_Click() 'Sheets("admin").Select Range("A1").Value = 2 'Sheets("Detail").Select Call make_formula End Sub I am sure this is basic stuff but I can't see how to do it. Thanks Andrew |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My problem is that as the code is on the worksheet code area, I can't
see how the code can be called from my module1 procedure??? Do you mean reset_buttons_on_error()? If yes, qualify like this: Sheets("Sheet1").reset_buttons_on_error Hth, Merjet |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Merjet.
Works great. Andrew |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Changing Cell Link on Spin Button Form Control | Excel Discussion (Misc queries) | |||
Triggering a macro to run by changing a radio button | Excel Programming | |||
Changing the colour of a control button in Excel | Excel Programming | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions |