It'sbest to avoid Merged Cells completely. Your code would be easier if you didn't have empty columns as well
Change your Submit code to this
Private Sub cmbSubmit_Click()
Dim NextRw As Long
'Write data to worksheet
If Me.cboOvertimeType.Value = "" Then
MsgBox "Please select the type of Overtime worked.", vbExclamation, "Overtime Form"
Me.cboOvertimeType.SetFocus
End If
With Worksheets("Overtime")
NextRw = .Cells(.Rows.Count, 1).End(xlUp).Row + 1
.Cells(NextRw, 1).Value = Me.RosStartDatePicker.Value
.Cells(NextRw, 2).Value = TimeValue(Me.RosStartTimePicker.Value)
.Cells(NextRw, 3).Value = Me.RosEndDatePicker.Value
.Cells(NextRw, 4).Value = TimeValue(Me.RosEndTimePicker.Value)
.Cells(NextRw, 6).Value = Me.ActStartDatePicker.Value
.Cells(NextRw, 7).Value = TimeValue(Me.ActStartTimePicker.Value)
.Cells(NextRw, 8).Value = Me.ActEndDatePicker.Value
.Cells(NextRw, 9).Value = TimeValue(Me.ActEndTimePicker.Value)
.Cells(NextRw, 12).Value = Me.cboOvertimeType.Value
End With
Unload Me
End Sub
Bookmarks