View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default Identifying Beginning and Ending Rows in a Selected Range

Maybe

Sub Macro2()

x = Selection.Rows.Count
y = Selection.Columns.Count
MsgBox x & " Rows. " & y & " Columns."

End Sub

Mike

"JR_06062005" wrote:

Is there a way in VB to identify the beginning and ending rows in a selected
range. The command below gives the address:

ActiveWindow.RangeSelection.Address

But what I want to do is to determine how many rows (and perhaps columns)
are in a selected range.