One might use the UsedRange property of the worksheet.
This is the range that has been used, but is only
refreshed on saving & re-opening. It is useful though.
The UsedRange has two properties. Columns.Count and
Rows.Count that return the UsedRange width and
height...ie columns and rows. BUT you need to know where
the UsedRange starts, so you'll need the Column and Row
values too.
So, on a spreadsheet...
With Activesheet.usedRange
LastRowUsed = .Row + .Rows.Count -1
LastColumnUsed = .Column +.Columns.Count -1
End With
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.