View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default dtermine row/column boundaries of selected area

Try

Sub Sonic()
FRow = Selection(1).Row
FCol = Selection(1).Column
LRow = FRow + Selection.Rows.Count - 1
LColumn = FCol + Selection.Columns.Count - 1

LRow = Selection(Selection.Cells.Count).Row
LColumn = Selection(Selection.Cells.Count).Column
MsgBox LColumn
MsgBox LRow
MsgBox FCol
MsgBox FRow
End Sub

Mike

"John Keith" wrote:

After a user has selected an area on a worksheet I need to have a
macro determine the top and bottom row boundaries and the left and
right column boundaries of the range. How is this accomplished in a
macro?

Thanks


John Keith