View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default How to define and select a range

Hi AG,

Dim rng1 As Range
Set rng1 = ???????


Try:

Set rng1 = Selection

---
Regards,
Norman



"AG" wrote in message
...
I have a group of cells that have been pasted in a worksheet and are now
active (highlighted.)
How do I set them as a range? I could set them as a name on the worksheet
but them would need to delete that name at the end of the macro since the
next time I run the macro, the group of cells would be in a different
location on the sheet.

Dim rng1 As Range
Set rng1 = ???????

If it makes a difference, the group of cells in question is adjacent to
other cells that I do not want to include and are pasted as hyperlinks
with
the highlighted cells containing the text display of various addresses.

Then how would I select that range later in the macro?
Range("rng1") .Select doesn't seem to work.