Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Quick question on naming a union of ranges [email protected] Excel Discussion (Misc queries) 2 July 29th 07 11:15 AM
VIEWING adjacent/nonadjacent cells or cell ranges in Excel 2007 Strabo Excel Discussion (Misc queries) 1 March 2nd 07 02:39 PM
how can I print non-adjacent ranges on one page steve Excel Discussion (Misc queries) 2 April 5th 06 04:36 PM
printing Union of Ranges anny Excel Worksheet Functions 2 January 26th 06 10:22 AM
VBA union of two ranges s[_2_] Excel Programming 1 August 21st 03 02:18 AM


All times are GMT +1. The time now is 09:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"