|
-
Jan 22nd, 2003, 07:51 AM
#1
Thread Starter
Hyperactive Member
Collection Index vs every other index I can think of **Resolved **
Why?
Why aren't collection's indexes zero based?
I have a list of 'instances' in a combo box
The 'instances' are members of a collection.
Item 1 in the combo box has an index of 0
But.. has an index of 1 in the collection... Pants!
It would be nice to write:-
clsObjects.Item(Me.ComboBox1.SelectedIndex).DoSomething
There are arrays and other controls that link to this collection via the index (or would do if I didn't have to keep remembering to put Index+1)
Does anyone know how I can get round this nicely?
Option 1 - Put something else in the combobox (and arrays etc..) at index 0 and start from 1.
Option 2 - ...
Thats as far as I got.
Anyone else had this problem?
Last edited by SjR; Jan 22nd, 2003 at 09:17 AM.
Another satisfied customer 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|