Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
radio button | Excel Discussion (Misc queries) | |||
radio button help | Excel Worksheet Functions | |||
radio button help | Excel Worksheet Functions | |||
How do I lock a radio button group if a N/A button is selected | Excel Discussion (Misc queries) | |||
VBA: Disable Frame and Radio Buttons based on Another Radio Button Being True | Excel Worksheet Functions |