Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default Add dimesion to Array already populated

Alan Beban wrote:
. . .
To get Harlan Grove's suggested code

v = Split("a b c d e f g h i j k l m n o p")
v = Application.WorksheetFunction.Transpose(v)
ReDim Preserve v(LBound(v, 1) To UBound(v, 1), 1 To 6)
v = Application.WorksheetFunction.Transpose(v)

to work I had to add ReDim v at the beginning; otherwise I got an
Invalid ReDim error message (in xl2002).


Sorry. Harlan Grove obviously intended the above snippet to follow the
Dim Statement he had provided, i.e.,

Dim v As Variant
ReDim v(0 To 1)
v(0) = Split("a b c d e f g h i j k l m n o p")
v(1) = Array(1, 2, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2)
Debug.Print v(1)(5); v(0)(9)

Alan Beban
Reply
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
First populated cell in row array/ Last populated cell in row arra Skyscan Excel Worksheet Functions 7 May 29th 08 05:20 PM
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) Keith R[_2_] Excel Programming 3 November 13th 07 04:08 PM
Lat populated cell Cyberwolf Excel Programming 4 November 10th 06 11:44 PM
populated Abhishek kedia Excel Discussion (Misc queries) 3 May 9th 06 08:45 PM
Populating Third Dimesion Based on Average of three elements of Third Dimension ExcelMonkey[_67_] Excel Programming 2 February 4th 04 09:06 PM


All times are GMT +1. The time now is 03:30 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"