Thank you for the reply. I edited your code to suit mine but it will not find the column i am looking for. Here is the actual code I have so far
Private Sub Submit_Click()
ActiveWorkbook.Sheets("sheet1").Activate
If (Me.txtRun.Text = "") Then
MsgBox "Enter the Run Number"
Exit Sub
End If
Dim txtRun As Range
Set txtRun = ActiveSheet.Range("$B$22:$K$22").Find(Me.txtRun.Text)
If (txtRun Is Nothing) Then
MsgBox "Column not found"
Exit Sub
End If
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtSerial.Value
ActiveCell.Offset(0, 1) = txtPallet.Value
If chkProblem = True Then
Range("N22").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtRun.Value
ActiveCell.Offset(0, 1) = txtSerial.Value
ActiveCell.Offset(0, 4) = txtPallet.Value
End If
End Sub
Bookmarks