Having a macro recognize when an option button has been selected
- From: "Linking to specific cells in pivot table" <Linkingtospecificcellsinpivottable@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 21 Aug 2005 18:46:02 -0700
Hi,
I'm trying to an IF THEN statement which is based on which one of two option
buttons was last selected. I have two option buttons ("OptionButton1" and
"OptionButton2" -- both from the 'Forms' menu) -- basically I'm trying to
create a macro that will look at which button is currently selected (this
button will already have it's radio button showing as being selected) and
will then execute code specific to which button it finds as being last
selected. Basically, I want the following:
'If 'OptionButton1' is slected, then:
Sheets("2nd Level Sources & Conv").Range("F27").Value = "Equivalent kwh/yr"
Else
Sheets("2nd Level Sources & Conv").Range("F27").Value = "Actual kwh/yr"
End If
Thanks for your help!
Rob
.
- Follow-Ups:
- Re: Having a macro recognize when an option button has been selected
- From: William Benson
- RE: Having a macro recognize when an option button has been selected
- From: Rowan
- Re: Having a macro recognize when an option button has been selected
- Prev by Date: Re: Multiple large .NewSeries lead to Run-time error 1004
- Next by Date: Problem with Range.Cells.Offset and Range.Cells( row + offset, column)
- Previous by thread: Need Help on Lookup Function
- Next by thread: RE: Having a macro recognize when an option button has been selected
- Index(es):