View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default Radio button use in form

Hi,

It might be easier to use a checkbox. Because if you only have one option
button you can't turn it off easily, you would want a second option button in
that case as part of a group.

Is this on a UserForm in VBA or a form in the spreadsheet? In the case of a
option button in the spreadsheet you can use a formula approach, but on a VBA
form you will need to use VBA. You might also choose to use VBA in the
spreadsheet because it is a little cleaner. On the vba form you will use code
attached to the on Click or Change procedure of the option button, similarly
to the checkbox.

For a spreadsheet check box the code might look like this

Private Sub CheckBox1_Click()
If Me.CheckBox1 = True Then
[A5] = [A1]
Else
[A5].ClearContents
End If
End Sub



--
If this helps, please click the Yes button

Cheers,
Shane Devenshire


"John Galt" wrote:

I guess this isn't as simple as I had hoped. Excel 2003 - I have a form that
has a space for Primary residence address and another for "subject Property",
I wanted to use a radio button named "same" to allow users to click it if the
address info should just be copied from Primary to corresponding cells in
Subject (i.e. Address, City, ZIP). And I of course want them to enter the
Subject Address in if it is indeed different, and I assumed that they would
need to uncheck the "same" radio button... Thank you in advance for any help