Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Radio Button output
Hi All, I have designed a form in excel with radio buttons 'Yes' And 'No' How can I fill a cell with Yes if 'Yes' Radio button is selected and No if 'No' Radio button is selected? Their Inputs of Yes and No are saved on an excel sheet, How can I progam it such that every record is saved and displayed in Next cell For eg: If on form I have a Question like: Are you a Male? o Yes o No The results are exported on excel sheet like: User Inputs(column header) Yes Yes No Yes No No Thanks is Advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Radio Button output
For the Yes button: Private Sub CommandButton1_Click() 'Change button name If CommandButton1.Value = True Then ActiveCell = "Yes" CommandButton1.Value = False End If End Sub Same code for the other button, except ActiveCell = "No". "sam" wrote in message ... Hi All, I have designed a form in excel with radio buttons 'Yes' And 'No' How can I fill a cell with Yes if 'Yes' Radio button is selected and No if 'No' Radio button is selected? Their Inputs of Yes and No are saved on an excel sheet, How can I progam it such that every record is saved and displayed in Next cell For eg: If on form I have a Question like: Are you a Male? o Yes o No The results are exported on excel sheet like: User Inputs(column header) Yes Yes No Yes No No Thanks is Advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Radio Button output
P.S. The code goes in the Form code module. "sam" wrote in message ... Hi All, I have designed a form in excel with radio buttons 'Yes' And 'No' How can I fill a cell with Yes if 'Yes' Radio button is selected and No if 'No' Radio button is selected? Their Inputs of Yes and No are saved on an excel sheet, How can I progam it such that every record is saved and displayed in Next cell For eg: If on form I have a Question like: Are you a Male? o Yes o No The results are exported on excel sheet like: User Inputs(column header) Yes Yes No Yes No No Thanks is Advance |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Radio Button output
I am wondering if the first one will really give you everything yow wanted. If you want a specified range to fill with the answers then maybe this modified version would work better. Let's say we are using Column D for the answer range. Dim x As Long 'Outside the macro Private Sub CommandButton1_Click() 'Change button name If CommandButton1.Value = True Then If x = Nothing Then x = 2 Range("D" & x) = "Yes" CommandButton1.Value = False x = x + 1 End If End Sub This way, x will update from either macro so that the answers will be in sync with the questions. Unless, of course, they skip one. This assumes row 1 will be a header row. "JLGWhiz" wrote in message ... For the Yes button: Private Sub CommandButton1_Click() 'Change button name If CommandButton1.Value = True Then ActiveCell = "Yes" CommandButton1.Value = False End If End Sub Same code for the other button, except ActiveCell = "No". "sam" wrote in message ... Hi All, I have designed a form in excel with radio buttons 'Yes' And 'No' How can I fill a cell with Yes if 'Yes' Radio button is selected and No if 'No' Radio button is selected? Their Inputs of Yes and No are saved on an excel sheet, How can I progam it such that every record is saved and displayed in Next cell For eg: If on form I have a Question like: Are you a Male? o Yes o No The results are exported on excel sheet like: User Inputs(column header) Yes Yes No Yes No No Thanks is Advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
radio button help | Excel Worksheet Functions | |||
How change cntrl toolbx radio button from T/F to numeric output? | Excel Programming | |||
"RADIO BUTTON" | Excel Discussion (Misc queries) | |||
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 |