View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.programming
SOS[_7_] SOS[_7_] is offline
external usenet poster
 
Posts: 1
Default VBA question - Type Mismatch

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/