Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for catching that Alan.
<<Note to self: Test **before** you post! Rick "Alan Beban" wrote in message ... Rick Rothstein (MVP - VB) wrote: I guess you could do this... Dim MyArray() MyArray = Array(1, 2, 3, , , , 7, 8, 9) . . . If you declare your array with an actual type (Integer, Long, String, etc.), then elements 4, 5, and 6 will take on the default value for those data types (0, 0, "", etc.). Rick No. You will get a Type mismatch error. Alan Beban "PMC1" wrote in message ... Hi, Using Excel 2003 VBA I'm looking to Populate a 1 dimensional Array with a Discontiguous values. For example, instead of fully declaring a range like this Array(1,2,3,7,8,9) I want ot pupulate the array by declaring the range and then use something like a loop to populate the array e.g. Dim myArRanges(1 to 3, 7 to 9) Redim MyArray(myArRanges) Could anyone suggest how this might be done. Thanks ..pc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Populate an array that is a subset of a larger array? | Excel Worksheet Functions | |||
Populate an array using a formula | Excel Programming | |||
Populate Array | Excel Programming | |||
populate array | Excel Programming | |||
Populate array | Excel Programming |