Can't quite find what I want anywhere so I thought I would just ask. I'm looking to change the amount of rows in a table based on a cell value in I1.
The code I have now is:
Sub Resize()
Dim rng As Range
Dim tbl As Listobject
Set rng = Range("Table1[#All]").Resize(24,9)
Activesheet.List.Objects("Table1").Resize rng
End Sub
Is there a way to reference the number in cell I1 and use it in place of the 24 when resizing?
The code I have now is:
Sub Resize()
Dim rng As Range
Dim tbl As Listobject
Set rng = Range("Table1[#All]").Resize(24,9)
Activesheet.List.Objects("Table1").Resize rng
End Sub
Is there a way to reference the number in cell I1 and use it in place of the 24 when resizing?