Hello BusDriver2,
I made a few changes to your "OK" command button code. It will now transfer the data from the User Form to the next empty line on your database worksheet. This macro has already been changed in the attached workbook.
Private Sub cmdOK_Click()
Dim Cell As Range
Dim Rng As Range
Dim RngEnd As Range
Dim Wks As Worksheet
Set Wks = ThisWorkbook.Worksheets("PERMANENT")
Set Rng = Wks.Range("A3")
Set RngEnd = Wks.Cells(Rows.Count, Rng.Column).End(xlUp)
Set Rng = IIf(RngEnd.Row < Rng.Row, Rng, RngEnd.Offset(1, 0))
Set Rng = Rng.Resize(1, 10)
With Rng
.Cells(1, 1) = txtName.Value
.Cells(1, 2) = cboABCD.Value
.Cells(1, 3) = txtDateArrived.Value
.Cells(1, 4) = cboABCType.Value
.Cells(1, 5) = txtDateIssued.Value
.Cells(1, 6) = txtBoardDate.Value
.Cells(1, 7) = txtQualifiedDate.Value
.Cells(1, 8) = cboQualifiedNotQualified.Value
If chkAAARequired = True Then
.Cells(1, 9) = "Yes"
Else
.Cells(1, 9) = "No"
End If
If optYELLOW = True Then
.Cells(1, 10) = "Yellow"
ElseIf optBLUE = True Then
.Cells(1, 10) = "Blue"
ElseIf optORANGE = True Then
.Cells(1, 10) = "Orange"
End If
.Cells(1, 1).Select
End With
End Sub
Bookmarks