In that case try this.
Are you using option explicit?
Dim ws As Worksheet, emptyRow&
Set ws = Worksheets(“Sheet1”)
emptyRow = Application.WorksheetFunction.CountA(Range(“B:B”)) + 5
ws.Cells(emptyRow, 2).Value = TextBox1.Value
ws.Cells(emptyRow, 3).Value = TextBox2.Value
ws.Cells(emptyRow, 4).Value = TextBox3.Value
And if you are trying to find the first empty cell in row I would use this.
Dim ws As Worksheet, emptyRow&
Set ws = Worksheets(“Sheet1”)
emptyRow = cells(Rows.Count, 2).end(xlup).row + 5
ws.Cells(emptyRow, 2).Value = TextBox1.Value
ws.Cells(emptyRow, 3).Value = TextBox2.Value
ws.Cells(emptyRow, 4).Value = TextBox3.Value
Bookmarks