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: 6
Default Redim Preserve doesn't work

I have so code (to array) and I use REDIM Preserve to make bigger
dynamic array, VBA give me error nr 9
subscribt out of range.
What i do wrong with redim preserve?

'this is that code

For int2 = 1 To 100
If int2 = 1 Then
ReDim tbl2(1 To 1, 1 To 4)
tbl2(int3, 1) = tab1(int2, 1)
int3 = int3 + 1
Else
ReDim Preserve tbl2(1 to int3,1 to 4)
tbl2(int3, 1) = tab1(int2, 1)
int3 = int3 + 1
End If
Next int2


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
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
VBA syntax help: ReDim Preserve an array Dave Excel Discussion (Misc queries) 4 September 8th 07 07:37 PM
ReDim, Preserve and Multidimensional arrays Andy Westlake[_2_] Excel Programming 3 October 19th 04 07:04 PM
Dim / Redim of an Array Fred[_17_] Excel Programming 4 June 28th 04 03:16 PM
ReDim an Array Art[_5_] Excel Programming 3 October 25th 03 03:30 PM
Redim MyArray Peter Pantus Excel Programming 2 September 27th 03 03:37 PM


All times are GMT +1. The time now is 04:13 AM.

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"