Assinging Range to mulitple selected cells?

G

gregga

If I use a range variable "rSelect" I can easily assign it to th
activecell in the active worksheet using...

rSelect = ActiveCell

But if the user selects multiple cells how do I assign rSelect...i
wont let me do it.

I have seen another macro that uses...

Selection.Copy

but I would like to manipulate those cells using a range before I past
them somewhere else.

Am I right off track (usually the case!) or is there an obvious way t
do this?

Thanks.

Greg
 
J

JE McGimpsey

One way:

Dim rSelect As Range
Set rSelect = Selection

If you want to be sure the selection is a range:

Dim rSelect As Range
If TypeName(Selection) = "Range" Then
Set rSelect = Selection
Else
MsgBox "No Range Selected"
End If
 
Top