Private Sub cmdOK_Click()
Application.ScreenUpdating = False
Dim Mylrow As Long, PLLrow As Long
Dim MyDate As String, MyVsle As String
Dim R
Mylrow = Sheets("All DOR'S").Range("B18").End(xlDown).Row + 1
Sheets("All DOR'S").Cells(Mylrow, 2).PasteSpecial xlValues
With UserForm4
MyDate = Calendar1.Value
If IsNumeric(Application.Match(MyDate, Range("H18:H" & Mylrow), 0)) Then
MsgBox "DOR of the date DATE has already been entered! Please select another date."
Exit Sub
End If
For R = 0 To .lstbVessel.ListCount - 1
If .lstbVessel.Selected(R) = True Then ''get the vessle name
MyVsle = lstbVessel.List(R)
End If
Next
'''' now det the last row form the pasted values '''
PLLrow = Sheets("All DOR'S").Range("B65536").End(xlUp).Row
'''' fill column H for Date and Column I for Vessle '''
Sheets("All DOR'S").Range("H" & Mylrow & ":H" & PLLrow).Value = MyDate '' this is for the Date
Sheets("All DOR'S").Range("I" & Mylrow & ":I" & PLLrow).Value = MyVsle
End With
Unload UserForm4 ''change to your userform
MsgBox "DOR data added successfully!"
End Sub