View Single Post
 
Old 01-06-2023, 04:01 PM
spillerbd spillerbd is offline Windows 10 Office 2021
Competent Performer
 
Join Date: Jan 2016
Posts: 130
spillerbd is on a distinguished road
Default

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.
Reply With Quote