Hello there.
I've written this code to find the last row in a sheet "ws2".
For various reasons i want to insert a table in this sheet, and acctually want to find the first empty row in the table. When setting up a table, it sets up the heading, and then one empty row. However, when running this code it finds the row after the first empty row in the table, NOT the first empty row under the heading.
So the question is: What can I do to find the first empty row in the table?
BTW: In my example the header is placed in collumn 3.
Thanks
I've written this code to find the last row in a sheet "ws2".
Code:
Sub Registrering()Dim ws1 As Worksheet, ws2 As Worksheet
Dim Fra As Long, Til As Long
Dim i As Integer
Dim StRw As Integer, EndRw As Integer
Application.ScreenUpdating = False
Set ws1 = Sheets("Rutine")
Set ws2 = Sheets("Kontakt")
Set Tab = Worksheets("KOntakt").ListObjects("Tab")
i = ws2.Cells(Rows.Count, 3).End(xlUp).Offset(1, 0).Row
MsgBox i
For various reasons i want to insert a table in this sheet, and acctually want to find the first empty row in the table. When setting up a table, it sets up the heading, and then one empty row. However, when running this code it finds the row after the first empty row in the table, NOT the first empty row under the heading.
So the question is: What can I do to find the first empty row in the table?
BTW: In my example the header is placed in collumn 3.
Thanks