Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have 10 questions. each question has 3 option button
if i select 1 option button for each quesiton it shoud store it in wor sheet. but it does not. coudl you verify this code. Private Sub CommandButton1_Click() Dim LastRow As Object Set LastRow = Sheet1.Range("a65536").End(xlUp) If OptionButton1.Value = True Then LastRow.Offset(1, 1).Value = OptionButton1.Caption Else If OptionButton2.Value = True Then LastRow.Offset(1, 1).Value = OptionButton2.Caption Else If OptionButton3.Value = True Then LastRow.Offset(1, 1).Value = OptionButton3.Caption End If End If End If LastRow.Offset(1, 0).Value = OptionButton.CaptionTextBox1.Text LastRow.Offset(1, 1).Value = TextBox2.Text LastRow.Offset(1, 2).Value = TextBox3.Text MsgBox "One record written to Sheet1" response = MsgBox("Do you want to enter another record?", _ vbYesNo) If response = vbYes Then TextBox1.Text = "" TextBox2.Text = "" TextBox3.Text = "" OptionButton1.Value = False OptionButton2.Value = False TextBox1.SetFocus Else Unload Me End If End Sub Private Sub CommandButton2_Click() End End Sub Private Sub UserForm_Click() End Su -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to programme this in excel? | Excel Discussion (Misc queries) | |||
Why I can copy nothing from excel to word or other programme? | Excel Worksheet Functions | |||
need to find a excel programme for rota's | Excel Discussion (Misc queries) | |||
How can I email a sheet, not programme, from excel | Excel Discussion (Misc queries) | |||
Excel Programme Management | Excel Discussion (Misc queries) |