It's okay folks - I worked it out
Sub Last()
Dim lngLastRow As Long
Dim lngLastCol As Long
With ActiveSheet
lngLastRow = .UsedRange.Rows(.UsedRange.Rows.Count).Row
lngLastCol = .UsedRange.Columns _(.UsedRange.Columns.Count).Column
lastcell = Cells(lngLastRow, lngLastCol).Address
Range("A1", lastcell).Select
End With
End Sub
Thanks anyway
Seamus
---
Message posted from
http://www.ExcelForum.com/