WxShady13
Board Regular
- Joined
- Jul 24, 2018
- Messages
- 184
- Office Version
- 365
- Platform
- Windows
- Mobile
I have a macro that adds a new row to a table. It will copy the formula correctly in column A but it doesnt in column B. I dont know why it is doing this.
VBA Code:
Sub AddRow()
Dim ws As Worksheet
Set ws = ActiveSheet
Dim tbl As ListObject
Set tbl = ws.ListObjects("PayData")
'add a row at the end of the table
tbl.ListRows.Add
'add a row as the fifth row of the table (counts the headers as a row)
'tbl.ListRows.Add 5
End Sub