Reputation: 31
I am trying to declare a variable for my excel table named "Technology Landscape" by entering the below code. Is this correct.
TL = Sheet1.ListObjects("TechnologyLandscape").Range.Table
Any ideas? Thanks..!
Upvotes: 3
Views: 10417
Reputation:
A ListObject object is like a range. It needs to be Set
.
Dim TL As ListObject
Set TL = Sheet1.ListObjects("TechnologyLandscape")
Debug.Print TL.ListRows.Count
Upvotes: 3