LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default refer to user selection

selection(selection.count).row
selection(selection.count).column

--
Regards,
Tom Ogilvy

"Neal Zimm" wrote in message
...
Thanks so much for the speedy reply, I'll try this out as soon as I finish
this reply.
I'm sure you know this, but I wrote the following 'on a lark'

Dim text As String
text = Selection.Address
MsgBox text

and it yielded: $D$5:$I$9

the thought of writing or stealing a routine to parse the answer was not
thrilling.
Again, Thanks.
Neal Z.





"Bob Phillips" wrote:

You could try

With Selection
row = .Cells(1,1).Row + .Rows.Count - 1
col = .Cells(1,1).Column + .Columns.Count - 1
End With

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Neal Zimm" wrote in message
...
Thanks, much, and I HATE being a pest like this, but what about the

cell
in
the lower right? I need to know the 'size' of the selected range.

Since
I
wrote you this morning, I tried the loop you mentioned to 'someguy'

and
was
able to make each cell the activecell and use the max function to trap

the
highest row and column values but I'm hopeful there's a better way.

I'll
see what Excel has on the keyword 'selection' in the interim.
Thanks in advance, again,
Neal Z


"Bob Phillips" wrote:

Neal,

When you have a multi-cell selection, just get the first cell, like

row = Selection.Cells(1,1).Row

col = Selection.Cells(1,1).Column

--






 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Code User Range Selection jimbo Excel Discussion (Misc queries) 5 January 5th 10 02:31 AM
Hiding worksheets based on user selection HL Excel Worksheet Functions 3 October 12th 06 04:01 PM
Generate a value from user selection in list box. Sol Excel Discussion (Misc queries) 2 September 8th 06 09:03 PM
User selection Samir[_2_] Excel Programming 3 January 7th 04 03:06 PM
How do I convert a user defined selection into an array? TBA[_2_] Excel Programming 3 August 18th 03 12:51 AM


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"