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: 5
Default How to Access Array of Arrays?

I have a variant array (vVal) that contains an arrays of type single.
In the for loop I (1) redim to 0, (2) extend array by 1, (3)
set value in array. The code I have there is wrong but sort of
shows what I am trying to do.


Dim v1() As Single
Dim v2() As Single
Dim v3() As Single
Dim vKey() As Variant
Dim vVal() As Variant
Dim i As Integer, k As Integer, j As Integer
Dim m As Integer

vKey = Array("VOLTAGES", "TEMPERATURES", "ROWS", "COLS",
"SENSE_AMPS")
vVal = Array(v1(), v2(), v1(), v2(), v3())
' Loop to test access
For i = 0 To UBound(vVal)
ReDim vVal(i)(0) ' Redim to 0
ReDim Preserve vVal(i)(UBound(vVal(i) + 1)) ' Add 1 item to array
vVal(i)(UBound(vVal(i)) = 125 ' Set value
Next i

 
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
Can I have an array of arrays and access an element simply? peter Excel Programming 4 February 10th 05 01:31 PM
Array of Public Arrays Hari Prasadh Excel Programming 1 January 21st 05 03:42 PM
array of arrays stored in Name: POSSIBLE? [email protected][_2_] Excel Programming 1 December 21st 04 10:55 PM
Array of Arrays in VBA Peter[_49_] Excel Programming 0 November 9th 04 09:50 PM
Extracting sub arrays from a 2-D VBA array Alan Beban[_2_] Excel Programming 7 August 16th 04 09:50 PM


All times are GMT +1. The time now is 01:24 PM.

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"