Would anyone have any ideas as to why this little piece of code results in the selection of Row 5003 (x= 5003)?
There is 'apparently' nothing in the spreadsheet except in the first 6 rows; or is it possible that there are 'things' in cells that I don't know about? And if so, any ideas as to how to find out what they are?
Thanks
Private Sub EndKeyPress()
Application.EnableEvents = False
x = ActiveSheet.UsedRange.SpecialCells(xlLastCell).Row
Range("A" & x).Select
Application.EnableEvents = True
End Sub
There is 'apparently' nothing in the spreadsheet except in the first 6 rows; or is it possible that there are 'things' in cells that I don't know about? And if so, any ideas as to how to find out what they are?
Thanks
Private Sub EndKeyPress()
Application.EnableEvents = False
x = ActiveSheet.UsedRange.SpecialCells(xlLastCell).Row
Range("A" & x).Select
Application.EnableEvents = True
End Sub