Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare Multidimensional Arrays
Leo,
I don't find any post by you on that date in my archives of this group nor in a Google Search (other than the post below). Alan Beban Leo Heuser wrote: I answered your very same question in this group on 11 Aug, but you never replied, so it's difficult to see, what you're after. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare Multidimensional Arrays
Thanks, Alan.
Very strange indeed! I just did a search in my archive of this group and found my answer right away. I'm on the msnews.microsoft.com server Here then is my answer in case Brent also can't find it. Very much like your own solution. ----------------------------- Hello Brent Here's one way to do it, if I have understood you properly. All Array() must have the same number of elements (here 3) Sub CreateArray() 'Leo Heuser, 11 Aug. 2003 Dim lColumn As Long Dim EndArray() As Variant Dim lRow As Long Dim PartArray(2) As Variant PartArray(0) = Array("a", "b", "c") PartArray(1) = Array("d", "e", "f") PartArray(2) = Array("g", "h", "i") ReDim EndArray(1 To UBound(PartArray) + 1, UBound(PartArray(0))) For lRow = LBound(EndArray, 1) To UBound(EndArray, 1) For lColumn = LBound(EndArray, 2) To UBound(EndArray, 2) EndArray(lRow, lColumn) = PartArray(lRow - 1)(lColumn) Next lColumn Next lRow For lRow = LBound(EndArray, 1) To UBound(EndArray, 1) For lColumn = LBound(EndArray, 2) To UBound(EndArray, 2) MsgBox "(" & lRow & "," & lColumn & ") " & _ EndArray(lRow,lColumn) Next lColumn Next lRow End Sub -- Best Regards Leo Heuser MVP Excel ------------------------------------- "Alan Beban" skrev i en meddelelse ... Leo, I don't find any post by you on that date in my archives of this group nor in a Google Search (other than the post below). Alan Beban Leo Heuser wrote: I answered your very same question in this group on 11 Aug, but you never replied, so it's difficult to see, what you're after. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare Multidimensional Arrays
By the way, Leo, after a more sensible search on Google I found your
post. I, too, am on msnews.microsoft.com, but sorting by date it shows nothing for between August 4th and today. Oh well, Alan Leo Heuser wrote: Thanks, Alan. Very strange indeed! I just did a search in my archive of this group and found my answer right away. I'm on the msnews.microsoft.com server Here then is my answer in case Brent also can't find it. Very much like your own solution. ----------------------------- Hello Brent Here's one way to do it, if I have understood you properly. All Array() must have the same number of elements (here 3) Sub CreateArray() 'Leo Heuser, 11 Aug. 2003 Dim lColumn As Long Dim EndArray() As Variant Dim lRow As Long Dim PartArray(2) As Variant PartArray(0) = Array("a", "b", "c") PartArray(1) = Array("d", "e", "f") PartArray(2) = Array("g", "h", "i") ReDim EndArray(1 To UBound(PartArray) + 1, UBound(PartArray(0))) For lRow = LBound(EndArray, 1) To UBound(EndArray, 1) For lColumn = LBound(EndArray, 2) To UBound(EndArray, 2) EndArray(lRow, lColumn) = PartArray(lRow - 1)(lColumn) Next lColumn Next lRow For lRow = LBound(EndArray, 1) To UBound(EndArray, 1) For lColumn = LBound(EndArray, 2) To UBound(EndArray, 2) MsgBox "(" & lRow & "," & lColumn & ") " & _ EndArray(lRow,lColumn) Next lColumn Next lRow End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Declare Multidimensional Arrays
Leo and Alan,
Thank you very much for your help, unfortunately I to lost track of where your previous comments were on the Microsoft Community and DevelopersDex wouldn't let me reply for some reason so I had to start a new topic. This information was exactly what I needed. Keep up the good work ! Yours sincerely, Brent McIntyre |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Declare and Set Public variables | Excel Discussion (Misc queries) | |||
How can I write multidimensional arrays in Excel Formulas? | Excel Worksheet Functions | |||
using linest excel function from msaccess with multidimensional ar | Excel Worksheet Functions | |||
Multidimensional Arrays - VBA | Excel Programming | |||
Multidimensional Arrays - VBA | Excel Programming |