Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default ResizeArray for Alan Question

Alan -

I'm using the ResizeArray in conjunction with a pair of Listboxes.
The first Listbox allows for multiselction, the second does not.
Users are selecting items in the listboxes and then as they get
selected,
they are moved off the list.

I am then taking those items out of the list by rebuilding the list
w/o the items that were just selected and then Resizing the Array
before I pass it to the listbox again.

I've come across an odd issue that has to do with the fact that I'm
using the 0 value in the array (e.g. Array(0)=....). When I get down
to 1 value being left, I'm passing this to the ResizeArray...

Resize Array RemainderArray,1 Items-1,1

The problem is then that Items-1 = 0 which when resized, I do get back
RemainderArray(0) = to what it should be, but it leaves
RemainderArray(1) = to whatever it was set to prior to the Resizing.

I'd rather not change my code to Option Base 1 because the logic is
spread through hundreds of lines of code. Is it possible that the
ResizeArray doesn't like an array of this size or am I resizing it
incorrectly.

Thanks Marston
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 783
Default ResizeArray for Alan Question

I'm not understanding

Resize Array RemainderArray,1 Items-1,1

Is it supposed to be ResizeArray rather than Resize Array?

What is 1 Items-1? is it supposed to be 1, Items-1?

Is RemainderArray at this point a three dimensional array? What are its
dimensions and to what are you expecting to change them?

Alan Beban

Marston wrote:

Alan -

I'm using the ResizeArray in conjunction with a pair of Listboxes.
The first Listbox allows for multiselction, the second does not.
Users are selecting items in the listboxes and then as they get
selected,
they are moved off the list.

I am then taking those items out of the list by rebuilding the list
w/o the items that were just selected and then Resizing the Array
before I pass it to the listbox again.

I've come across an odd issue that has to do with the fact that I'm
using the 0 value in the array (e.g. Array(0)=....). When I get down
to 1 value being left, I'm passing this to the ResizeArray...

Resize Array RemainderArray,1 Items-1,1

The problem is then that Items-1 = 0 which when resized, I do get back
RemainderArray(0) = to what it should be, but it leaves
RemainderArray(1) = to whatever it was set to prior to the Resizing.

I'd rather not change my code to Option Base 1 because the logic is
spread through hundreds of lines of code. Is it possible that the
ResizeArray doesn't like an array of this size or am I resizing it
incorrectly.

Thanks Marston

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
Has anyone used arrayfunctions from Alan Beban? SteveT Excel Worksheet Functions 3 February 26th 07 07:52 AM
VlookupS-Alan Beban Deeds Excel Worksheet Functions 4 December 20th 05 12:03 AM
Attn Alan Bedan re arrays Gary[_18_] Excel Programming 6 June 28th 04 10:51 AM
Problem with Alan Beban's ResizeArray RB Smissaert Excel Programming 3 January 29th 04 11:46 PM


All times are GMT +1. The time now is 02:42 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"