The best way to get number of last row used is:
ActiveSheet.UsedRange.Rows.Count
for the current sheet.
Worksheets("Sheet name").UsedRange.Rows.Count
for a specific sheet.
To get number of the last column used:
ActiveSheet.UsedRange.Columns.Count
for the current sheet.
Worksheets("Sheet name").UsedRange.Columns.Count
for a specific sheet.
I hope this helps.
Abdo