Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Selected Cells
In a VBA macro how do I determine the current selected
range. I am sure this is trivial, but I am having no luck finding an example of code to do this. Thanks for any help. John |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Selected Cells
John,
If you want to determine if a particular cell is selected, use something like If Not Intersect(Selection, Range("B99") Is Nothing Then ... or If Not Intersect(Selection, Range("B99:B100") Is Nothing Then ... -- HTH Bob Phillips "Jim Rech" wrote in message ... Perhaps you want something like this: MsgBox Selection.Address or MsgBox ActiveWindow.RangeSelection.Address The later for those rare occasions when the current selection is not a range, such as when an object is selected. -- Jim Rech Excel MVP |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Determine Selected Cells - Got it Thanks!
-----Original Message----- In a VBA macro how do I determine the current selected range. I am sure this is trivial, but I am having no luck finding an example of code to do this. Thanks for any help. John . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple cells or columns are selected instead of selected cell or | Excel Discussion (Misc queries) | |||
determine the name of the selected pivot table | Excel Discussion (Misc queries) | |||
Cells are selected but aren't displayed as selected | Excel Discussion (Misc queries) | |||
Cells are selected but aren't displayed as selected | Excel Worksheet Functions | |||
A validated List which link to selected cells according to what is selected on the list | Excel Worksheet Functions |