View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ilyaskazi[_95_] ilyaskazi[_95_] is offline
external usenet poster
 
Posts: 1
Default Ctrl+End with VBA


By pressing CTRL + End key excel takes you to last used range of you
active sheet.

Through vba, try this...


Code
-------------------

Sub Select_CTRL_END()
Dim myCol As Integer, myRow As Long
myCol = ActiveSheet.UsedRange.Columns.count
myRow = ActiveSheet.UsedRange.Rows.count

ActiveSheet.Cells(myRow, myCol).Select 'optional to select

'Find your last cell
MsgBox ActiveSheet.Cells(myRow, myCol).Address(False, False)

End Sub

-------------------

--
ilyaskaz
-----------------------------------------------------------------------
ilyaskazi's Profile: http://www.excelforum.com/member.php...fo&userid=2396
View this thread: http://www.excelforum.com/showthread.php?threadid=47777