Good Afternoon folk
I have a userform for inputing information to a spreadsheet using the code below. It works fine however if the user does not select a radio button to select a score its saving the rest without it. How can I ensure the user selects a score,,,, ob10, ob8, ob6, ob4, ob2, obna
Private Sub cmdAdd_Click()
Dim iRow As Long
Dim ws As Worksheet
Dim a As Integer
Set ws = Worksheets("Scorepoints")
iRow = ws.Cells(Rows.Count, 1) _
.End(xlUp).Offset(1, 0).Row
a = MsgBox("Please check all information is correct. Select 'Yes' to save, Select 'No' to change", vbYesNo)
If a = vbYes Then
Unload Me
Else
Exit Sub
End If
ws.Cells(iRow, 1).Value = Me.txtpoint.Value
ws.Cells(iRow, 2).Value = Me.txtname.Value
ws.Cells(iRow, 3).Value = Me.txtcomments.Value
ws.Cells(iRow, 4).Value = Me.ob10.Value
ws.Cells(iRow, 5).Value = Me.ob8.Value
ws.Cells(iRow, 6).Value = Me.ob6.Value
ws.Cells(iRow, 7).Value = Me.ob4.Value
ws.Cells(iRow, 8).Value = Me.ob2.Value
ws.Cells(iRow, 9).Value = Me.obna.Value
ws.Cells(iRow, 10).Value = Me.cbhr.Value
ws.Cells(iRow, 11).Value = Me.obone.Value
ws.Cells(iRow, 12).Value = Me.obtwo.Value
ws.Cells(iRow, 13).Value = Me.obthree.Value
Unload Me
scoreselect.Show
End Sub
Many thanks for your help
Bookmarks