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: 83
Default select multiple named ranges with macro


I have a macro that looks at the active cell and determines the named
ranges that it is a part of. It can be one named range or many. I
store the names in an array, one name per element in the array.
After populating the array with the names, I want to select all of the
named ranges that have been stored in the array.
I can do this easily like this:

Range(€œmg_benefits, mg_FY11,mg_fy12€).select

but when I try to do the same thing from my array it
doesnt work.
My array is: Dim vSelections(1 to 100) as Variant

I fill the first three elements with the names above. Ive tried

Range("vSelections(1), vSelections(2),vSelection(3)").Select

and

Range(vSelections(1), vSelections(2) ,vSelection(3)).Select

But these dont work. I think Im missing something simple, but I
cant figure it out. Any suggestions?


 
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
Selecting multiple named ranges Ted M H[_2_] Excel Programming 1 July 11th 09 07:58 PM
Named Ranges - Multiple Worksheets Josh O. Excel Discussion (Misc queries) 3 April 1st 09 07:31 PM
Named ranges scope / workbook/worksheet level named ranges- changeswith variable use... christian_spaceman Excel Programming 3 December 24th 07 01:15 PM
Multiple areas in named ranges agarwaldvk[_27_] Excel Programming 3 September 13th 04 10:11 PM


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