Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am currently adapting some old VBA code and want store all my
configuration settings as Names to eliminate having a separate worksheet for that. I have loaded strings and arrays into names and have been successful in pulling the strings back out into my code but when pulling the array back can only access the first value in the array and cannot find a method to pull specific rows/columns (i.e. array(2,3)). I have searched online and in VBA books I have and cannot find anything on this and none of my ideas for making it work have succeeded so does anyone know if this is even possible? Dustin Russell |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is one way (demo'd from the immediate window)
v = Evaluate("{11,12,13,14;21,22,23,24;31,32,33,34;41, 42,43,44}") ? v(1,1) 11 thisworkbook.Names.Add Name:="ABC", Refersto:=v v1 = Evaluate(thisworkbook.Names("ABC").Value) ? v1(2,3) 23 -- Regards, Tom Ogilvy " wrote: I am currently adapting some old VBA code and want store all my configuration settings as Names to eliminate having a separate worksheet for that. I have loaded strings and arrays into names and have been successful in pulling the strings back out into my code but when pulling the array back can only access the first value in the array and cannot find a method to pull specific rows/columns (i.e. array(2,3)). I have searched online and in VBA books I have and cannot find anything on this and none of my ideas for making it work have succeeded so does anyone know if this is even possible? Dustin Russell |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for the repy, I actually was able to figure out a method by
just declaring an empty array then assigning the names value(s) to it Dim rptarray() As Variant rptarray = [reports] |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Functions, Arrays and number/text stored as text | Excel Worksheet Functions | |||
Working with ranges in arrays... or an introduction to arrays | Excel Programming | |||
Arrays - declaration, adding values to arrays and calculation | Excel Programming | |||
accessing an address stored in another cell | Excel Worksheet Functions | |||
array of arrays stored in Name: POSSIBLE? | Excel Programming |