Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Radio button use in form

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
  #2   Report Post  
Posted to microsoft.public.excel.misc
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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10
Default Radio button use in form

Hello Shane,
Sorry for long delay. I tried what you had below and it seemed to have a
problem with the "Me" thing, so i copied from another Macro and tried this:

Sub SameAddressBox_Click()
If SameAddressBox = True Then
[SubjectAddress] = [E9:L9]
Else
[SubjectAddress].clearcontents
End If
End Sub

I also tried it with the clearcontents line but it told me it couldn't
change a merged cells contents? So I took that out and tried it with out that
at all. I figured I was just in over my head and should get on here and
follow up. Obviously none of it seems to be working? Where'd I go wrong?

"SubjectAddress" is what I named the merged cells E15:L15

"Shane Devenshire" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
radio button Chey Excel Discussion (Misc queries) 1 January 3rd 08 07:42 PM
radio button help tjb Excel Worksheet Functions 1 September 27th 05 11:51 PM
radio button help tjb Excel Worksheet Functions 1 September 27th 05 01:16 AM
How do I lock a radio button group if a N/A button is selected worry a lot Excel Discussion (Misc queries) 2 May 21st 05 08:33 PM
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True Mcasteel Excel Worksheet Functions 2 October 29th 04 07:06 PM


All times are GMT +1. The time now is 02:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"