LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How do I programmatically select various ranges in vba?

From what I understand you must use Application.Union to combine large Range
groups in vba to use in Excel.

Somthing like...

Dim BigRange as Range, R(10) as String
R(1) = "1:1, 3:3"
R(2) = "7:7, 20:20, 43:43"
R(3) = "100:100"

Set BigRange = Application.Union ( Range (R(1)), Range (R(2)), Range
(R(3)) )
BigRange.Select


Which is fine and dandy with just the 3, but if I had a hundred or so ranges
how would I create a loop statment to combine the various ranges.

*The ranges would contain the entire row of a worksheet and only values from
the first column that contain the text "PICK ME!" would be selected.


Any help is much appreciated!
 
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
Programmatically allowing user to select worksheet Barb Reinhardt Excel Programming 2 November 27th 07 06:08 PM
Build Select Case Programmatically Dave Birley Excel Programming 11 June 1st 07 05:39 PM
Programmatically Protect/Unprotect Ranges in Excel 2003? Tony Excel Programming 2 May 23rd 07 05:27 PM
Programmatically Select Tab on Ribbon? [email protected] Excel Programming 1 February 21st 07 01:59 PM
VBA-Select several ranges using variables waveracerr[_8_] Excel Programming 2 February 10th 04 11:12 PM


All times are GMT +1. The time now is 01:30 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"