View Single Post
  #4   Report Post  
Jim Rech
 
Posts: n/a
Default Array to named range conversion...

at the end of your code, I added the following to create the named
range: ActiveWorkbook.Names.Add Name:="mynamedrange", RefersTo:=myarray


That really can't be true since I don't have a "myarray" in my code.

Once the sheet names are listed create a name for that range, not for the
array. At least if you're sticking with what you said in your first
message - "Then, use the named range as the
list in a "data validation"..."

--
Jim
"i-Zapp" wrote in
message ...
|
| that's a step closer, but I still don't have the 'named range'
| configured properly yet.
|
| at the end of your code, I added the following to create the named
| range:
|
|
| Code:
| --------------------
| ActiveWorkbook.Names.Add Name:="mynamedrange", RefersTo:=myarray
| --------------------
| where 'myarray' is the array created by the macro.
|
| if i then look at the newly created named range via Insert|Name|Define
| in Excel, then I get as a formula what looks like the classical array
| syntax, complete with brackets { }...
|
|
| Code:
| --------------------
| ={"Sheet1";"Sheet2";"Sheet3"}
| --------------------
| Problem is that it won't work as an argument for the data validation
| list source. How do I un-array it?
|
| .
|
|
| --
| i-Zapp
| ------------------------------------------------------------------------
| i-Zapp's Profile:
http://www.excelforum.com/member.php...fo&userid=5768
| View this thread: http://www.excelforum.com/showthread...hreadid=479125
|