I am trying to convert a recorded macro to a generic VBA script (my first one ever). The recorded macro produced specific names in the code like Sheet8 and Table5. I need these to be determined dynamically in the code, and so far, I've been able to figure that out...
'This table name needs to be dynamically determined...
Dim myTable As ListObject
Set myTable = ActiveSheet.ListObjects.Add(xlSrcRange, myRng, , xlNo)
However I need help figuring out how to convert these lines...
Range("Table5[[#Headers],[Column1]]").Select
...to something that uses the myTable ListObject.
Any ideas? Thanks!