Hi I'm new to VBA and I'm completely stuck with an issue that is driving me to insanity!! I'm hoping someone will be able to help me please. I have added a UserForm1 to aid data entry in excel by the user. Inside the UserForm1, I have a multipage with 8 pages. Each page has a frame with multiple checkboxes. Once the SubmitButton is clicked, if checkboxes ticked the checkbox caption will be transferred to a designated cell in sheet Data Submitted. Frame1 checkboxes caption go to Cells(nr, 23) and Frame2 checkboxes go to .Cells(nr, 24). My problem is that I'm getting the Frame1 checkboxes caption on Cells(nr, 23) but it repeats to Cells(nr, 24) to!!! I've tried everything but unfortunately without no success. Please help?

Please find an extract of the code below:

Private Sub CmdButtonSubmitForm_Click()

Dim ssheet As Worksheet
Set ssheet = ThisWorkbook.Sheets("Data Submitted")
nr = ssheet.Cells(Rows.Count, 1).End(xlUp).Row + 1

Dim ctl As MSForms.Control
Dim lines As String, delimiter As String

For Each ctl In Me.Frame1.Controls
If TypeName(ctl) = "CheckBox" Then
If (ctl.Value) Then
lines = lines & delimiter & ctl.Caption
delimiter = " ; "
End If
End If
Next

With Sheet3
.Cells(nr, 23).Value = lines
End With

For Each ctl In Me.Frame2.Controls
If TypeName(ctl) = "CheckBox" Then
If (ctl.Value) Then
lines = lines & delimiter & ctl.Caption
delimiter = " ; "
End If
End If
Next

With Sheet3
.Cells(nr, 24).Value = lines
End With
EndSub