Option Button Quickie

N

nevoir

Hi All,

Im a newbie to excel, please help....

All I want to do is to get a row of 6 option buttons to set a value i
another excel cell. The first will set the value to 1, the second to
etc...

How on earth do I do this?

Many Thanks,

Ne
 
B

Bob Phillips

Why not use a spinbutton?

Private Sub SpinButton1_SpinUp()
If Range("H1").Value < 6 Then
Range("H1").Value = Range("H1").Value + 1
End If
End Sub

Private Sub SpinButton1_SpinDown()
If Range("H1").Value > 0 Then
Range("H1").Value = Range("H1").Value - 1
End If
End Sub


--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
M

Melanie Breden

All I want to do is to get a row of 6 option buttons to set a value in
another excel cell. The first will set the value to 1, the second to 2
etc...

How on earth do I do this?

insert from the Forms toolbar a OptionButton on the sheet.
Then right click on the Button - > Format Control and indicate the linked cell.
Insert then the other 5 OptionButton, without indicating a cell linkage.

--
Regards

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)
 
Top