Hey Guys
I have the below code which creates a new Column in Table 1 and labels its header as 'B' and creates a new Row in Table 3.
What I want is a sequential labelling of both the New Column header in Table 1 and the first cell of the new Row in Table 3 as 'A', 'B', 'C', etc. whenever a new Column or row is created.
Sub AddNewColumm()
Dim tbl As ListObject
Dim Table As ListObject
Set Table = Sheet1.ListObjects("Table1")
Set tbl = ActiveSheet.ListObjects("Table3")
Table.ListColumns.Add 4
Table.HeaderRowRange(4) = "B"
tbl.ListRows.Add AlwaysInsert:=True
End Sub
Thanks!!
I have the below code which creates a new Column in Table 1 and labels its header as 'B' and creates a new Row in Table 3.
What I want is a sequential labelling of both the New Column header in Table 1 and the first cell of the new Row in Table 3 as 'A', 'B', 'C', etc. whenever a new Column or row is created.
Sub AddNewColumm()
Dim tbl As ListObject
Dim Table As ListObject
Set Table = Sheet1.ListObjects("Table1")
Set tbl = ActiveSheet.ListObjects("Table3")
Table.ListColumns.Add 4
Table.HeaderRowRange(4) = "B"
tbl.ListRows.Add AlwaysInsert:=True
End Sub
Thanks!!