You can also use CurrentRegion, which is like pressing CTRL+* in a range, and may be better depending on the source of the data/workbook. TABLES are generally better.
Code:
MyTableasRange = MyWorksheet.Range("A1").CurrentRegion
Where the variable MyTableRange is DIM as a RANGE
and MyWorkSheet is DIM as a Worksheet and defined to the desired worksheet where the table resides.