stuck on option buttons

E

excel_stuck

I have a simple question, I think, for all you experts out there. I have two
option buttons in a textbox in a spreadsheet. I want to know the state (or
value) of each of the buttons at any given time. I cannot seem to find the
correct property name for the button to extract the value. I can find out
their name, position, etc from the shapes list, but I need the actual value.
The buttons are named opt_BUT1 and opt_BUT2. How can I determine the value
of these buttons?
 
B

Bob Phillips

activesheet.optionbuttons("opt_But2").value

if it is a forms button (will return 1 or -4146, xlon or xloff)

activesheet.oleobjects("opt_But1").object.value

for a control toolbox button, return True/False

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
E

excel_stuck

That's it! Thanks so much!

Bob said:
activesheet.optionbuttons("opt_But2").value

if it is a forms button (will return 1 or -4146, xlon or xloff)

activesheet.oleobjects("opt_But1").object.value

for a control toolbox button, return True/False
I have a simple question, I think, for all you experts out there. I have two
option buttons in a textbox in a spreadsheet. I want to know the state (or
[quoted text clipped - 3 lines]
The buttons are named opt_BUT1 and opt_BUT2. How can I determine the value
of these buttons?
 
Top