Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referring to a user-selected range
Can anyone advise how I can refer to a range in a spreadsheet that has
been selected by the user? Late in the macro, I need to loop through all the cells in a range that the user selected earlier, and perform an operation on each of them that depends on its location within the range, but I can't figure out how to identify the range. Thanks James McIntosh Australia |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referring to a user-selected range
James,
Sub testit() Dim rng As Range If TypeOf Selection Is Range Then For Each rng In Selection Debug.Print rng.Address Next End If End Sub Rob "James Mc" wrote in message om... Can anyone advise how I can refer to a range in a spreadsheet that has been selected by the user? Late in the macro, I need to loop through all the cells in a range that the user selected earlier, and perform an operation on each of them that depends on its location within the range, but I can't figure out how to identify the range. Thanks James McIntosh Australia |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Referring to a user-selected range
Rob, Thanks for the code, I'll try it James *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
dynamic chart on user selected data range in Excel 2007 | Charts and Charting in Excel | |||
Referring to the previous selected sheet in a macro | Excel Discussion (Misc queries) | |||
Identify User Selected Range | Excel Programming | |||
Identify Range Selected By User | Excel Programming | |||
Determining end of user-selected range | Excel Programming |