Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiple Range Selection
I want to start a routine by getting a range for each of the cells that the
user has selected by holding down the shift key or control key. I cannot find a way to get a reference to these ranges? Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Multiple Range Selection
Hello mcgj, Dim Address As String Dim Cell Dim Rng As Range Dim Selections As Long Set Rng = Application.Selection Selections = Rng.Areas.Count Address = Rng.Areas(1).Address Selections will equal the number of cells selected. Zero indicates nothing was selected. You can use a For Each loop to sequence through automatically... For Each Cell In Rng.Areas '<Add in your code Next Cell Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=497786 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Narrow Range based on Selection in Another Range | Excel Discussion (Misc queries) | |||
Multiple range selection issue | Excel Discussion (Misc queries) | |||
Identifying a selection of a selection of a range | Excel Worksheet Functions | |||
Excel VBA - Range(Selection, Selection.End(xlDown)).Name issue. | Excel Programming | |||
Creating range name for a range selection | Excel Programming |