Dim i As Integer
Dim wb As Workbook: Set wb = ThisWorkbook
Dim ws As Worksheet
Dim NextRow As Long
Dim LastRow As Long
Dim wsName As String
wsName = FormSelectSht.ComboBoxMachines.Value
For Each ws In wb.Sheets
If ws.Name = wsName Then ws.Activate
LastRow = ws.Cells("A", Rows.Count).End(xlUp).Row
Next
'Find Last row
'LastRow = ws.Cells.Find("*", [A4], , , xlByRows, xlPrevious).Row
'Find next empty row to enter data
NextRow = LastRow + 1
'énter data into active sheet
ws.Range("A" & NextRow) = Date
ws.Range("B" & NextRow) = FormSelectSht.ComboBoxProduct.Value
'ws.Range("C" & NextRow) = juliandt
ws.Range("D" & NextRow) = FormSelectSht.TextBoxOperator1.Value
ws.Range("E" & NextRow) = FormSelectSht.TextBoxOperator2.Value
ws.Range("F" & NextRow) = FormSelectSht.TextBoxLot.Value
End Sub