View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Rech Jim Rech is offline
external usenet poster
 
Posts: 2,718
Default union method for non-adjacent ranges

Use Set with Union if you want to create a range. You might dim acd and bef
as ranges to faciliate your work. It's best to use the specific data type
rather than a variant or object if possible.

Whether this gives you the result you want I don't know.

Dim a, b, cd, ef, acd, bef As Variant


This only dims bef as variant directly. The others are variants too but
only because it is the default data type. VB is not like C; you have to
"as" each variable.

--
Jim Rech
Excel MVP