Hi
I'm trying to write a bit of vba to copy data into a table and then insert a row underneath it. At the moment I've got this;
Dim lo As Excel.ListObject
Dim loRow As Excel.ListRow
Dim i As Long
Set lo = ThisWorkbook.Sheets("Data").ListObjects(1)
With lo
Debug.Print .Range.Address
For i = 1 To 10
Set loRow = .ListRows.Add(i)
loRow.Range.Cells(1).Value = "test" & i
Next i
Debug.Print .Range.Address
Debug.Print .DataBodyRange.Address
End With
But instead of inserting "test" I want the vba to copy over data from another sheet onto a new one. Can anyone help?
Thanks :D
Bookmarks