o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

VB Collection help -

I need to compare wether a collection item at index (n) is = nothing...for validation purposes.

If myColl.Item(n) = Nothing Then

except that this gives me an error...I can't seem to find enough
specifc material on collections being compared to nulls to
find out if that index exists or has something in it.

-- "looking towards the sun for answers"

 

collections help please!!! -
What exactly does a collection do? if i set a new collection in my form will i be about to use the collection in other forms? what is a collection of classes are there?? can only show me basics of a collection with examples add , remove , items etc keywords? understanding is m


Comparing info in a Collection -
I am currently using a collection to store data about products. I want to compare fields in 2 different collection items, and then sort by which has the greatest number in the collection item that is being compared. For example I have: Collection Item 1 has a field names matches


Collection in dll be accessable from other dll. -
Ok, here is what I need. I need to have a dll that will hold a collection of connected sockets. A third party dll needs access to this collection. I have tried this many times before, but whenever I try to access the collection which I tried making static, the thrid party dll just gets


adding to a collection -
I'm unfamilar with how to add an item(record) to a collection. I've already established the collection but keep getting errors on the add. My code looks like: collection.add ( When I put the first ( in place VB opens up this info box listing all my collection elements and their


Collections, classes and New() -
I have a "master" collection and a temporary collection, each is based on a class that I defined. The "master" collection exists as a private form variable. The temporary collection exists in a sub on that form. In the sub I set my temporary collection equal to t


How to get values from session objects -
I ahve a collection object saved in the session I have also declared a new collection object When I do the following(written from memory ) dim newcoll as new collection newcoll = Cast(Session("Collection"), Collection) I get only a reference to the session colle


adding a collection to an arraylist collection -
for instance, i have a people class and a people collection. i would like to create a phone collection which consists of phone class and phone collection and then attach this to the people class object. so, in effect, i can call each people item and have the phone collection


Struggle with collections -
Is it possible to know on what index you are in your collection? I work with VB6 but because I'm a straight object oriƫntated [Edited by MartinLiss]I work with classes (yeah right). So I've got a collection of this class. Problem is on a certain moment I want to change the data of one


Garbage Collection in VB -
Do you have to do garbage collection in VB like you do in C? Or does VB do automatic garbage collection like Java? If I must free up the memory used by VB, what are the commands? I did a search for garbage collection in MSDN and got nothing related to VB. I am assuming some G


return a collection from a fucntion -
Hi I have a command button when clikced goes to a class module function, which get a collection of all mails in my Inbox. I need to return the collectoin to myform and be able to access the collection. How do i do it????? When i do the processin in same Sub it works fine. But when


Labels collection... -
I have a prob which may be able to be solved by a collection... Can someone give me quick runthrough on how I could create a collection of labels, and set their properties. I would like to reference them by an Index, not a Key. (I'm using a collection 'cause I want the Remove me


Creating a collection -
Hi. I have a small problem about creating a collection. I sure know how to loop through all controls of a collection (for each ctl in form.controls). The problem is I would like to CREATE such a collection myself. (Ex.: I will add to a collection all the textboxes that the user have


Checking for instance of string in collection -
Hello folks, I'm looking to make my own duplicates remover whichout using others available and am using a collection for this, as a collection I beleive can only hold one of the same item once, if there any method available that can check the current collection for a item already house


Transferring contents of server collection to local collection -
Hello folks, I have an ASP page which uses a server based dll to instantiate a collection which is used to poulate a list box. The collection is two columns and I want to use the second column to populate a text box based on the row in the listbox which is selected. I am not an A


Advanced collection -
Can anyone tell if this is possible in VB6? I have an object structure like this. Rootobject --companycollection ----company ------contactcollection --------contact But now I want to make another collection that points directly into the existing contact collection. Rootob


Collection v/s Datatables -
What is better in terms of performance and resource-use, a Collection or a DataTable? What are the different situations in which a Collection will work better than a DataTable, and vice versa? What would be the ideal method for replacing a Collection in code with a DataTable?


Passing VB.net collection to VB6 com dll -
Hi, I have a VB6 COM DLL that expects a VB6 style collection object as parameter to a method. It seems like I can not pass a VB.NET created collection. What do I have to do? I can not make any modifications to the VB6 COM DLL. The VB6 DLL accesses items in the collection by a


Edit/Display/Deleting from a Collection -
Class/collection newbie questions for a homework assignment. Here we go: 1 form (textboxes to accept data and add, edit, display data in the collection) clsMotor (with defined properties for the class) clsMotors (collection that contains methods for saving, deleting, editing, disp


Loading collection from file -
I have created a student collection, attached below, to add student information to a file. What I cannot figure out is how to modify the collection so it saves the collection in a file or database before the program exits. When it starts up, it needs to load the collection from that f


How to get Unique List from a Collection -
Hi I have a collection in vb which has collection of strings. Is there any easy way to get unique list from the collection or do we have any thing similar to collection that gives us unique list easily. We have HashSet in java which gives us unique collection.So do we have any


Recordset to Collection -
I have tried taking the records from a recordset and building a collection. Problem is that I close the recordset afterwards. When trying to access items in the collection, they are invalid (because the RS is closed). How can I transfer the values of the RS rather than create poin


enumerate collection in RichTextBox -
How do I print the items in my collection in a RichTextBox. If I try to show the items in my collection in debug.print, all the items in my collection show. So I know I have the enumeration part set up correctly. If I try to use the same process in the RichTextBox, it loops through


Java - Two Collections. The same elements or have no elements in common -
Two methods are needed in this case. Code: boolean containsAll(Collection<?> c) boolean disjoint(Collection<?>c1 Collection<?>c2) Since [i]containsAll(Collection<?> c)[i] is defined within the Collection interface all concrete implementations will be abl


CLR & Garbage collection -
in ASP there is no such concept called "Garbage collection". In .net web development how the Garbage collection works. how can i expose garbage collection. can any one give me an example or any presentation for Garbage collection


Creating a new collection (clearing it) -
Hi, If I create a collection class with a private collection variable to hold all it's child items, do I need to set each item to "Nothing" before creating a new collection? Like: Dim errxDelete As Error For Each errxDelete In mcolErrors Set errxDelete = Nothing


Moving Collection Items -
I've never used a Collection before and I was wondering how would I go about moving an item from one index to another? I want to display the item that has an index of 0 and then remove it form the collection at a certain interval. Then I want to move all teh other items up a spot in


Maximum items in a collection -
I got a problem with the collection object in Visual Basic 6. A maximum of 256 items can be added in a collection. But, if you pass this limit, no more item are add in collection, but the count property continue to expand. Example: Dim colTest As New Collection Dim iCpt As in


Needs Help With VB6 Collection -
Well, heres what i need to do, its quite simple, actually. I need to go through each element of a given collection, in a loop. (Probobly For...Each) But i also need to get the Key of each Collection Item i pass though. Can anyone help me?


Collection confusion -
I used a collection in my application, because I thought I could use a string as key for the items in the collection, but I get an error. Am I doing something wrong, or isn't it possible to use strings as keys?


collection object -
Does anybody knows if a collection is more like a linked list or like an array ? In other words, when the proc 'add()' of the collection is called, is it making something like 'realloc' in C ?


Clear Collection items ...., -
Hai , I have a new collection RowE , i keep adding values to the collection and perform some string comparision, addition or whatever with them all, Now when i unload the form i need to clear all the contents in the collection . That is i want, RowE.Count shld be = 0. How can


Challenge : (can't describe it in header) -
Here it is. Say you have a collection of car objects:Type Descriptor TypeID FORD ESCORT 3 HONDA CIVIC 1 HONDA CRX 1 TO


[2008] Removing items from collection without shifting index -
Hi I have an old school collection that now I need a feature where I can remove an item, however the index can not change, it is very important, so how, if it's even possible can I remove an item but somehow keep the collection from shifting indexes? I tried setting all the elements


VB6 Collection Classes in C# -
Hi still getting my head round C# ( but it is great) trying to do something I use to use a lot in VB6 that being the Collection Class but have no idea how to achieve this via C# ( it does not even support the collection object unlike VB.Net) Any help would be appreciated


Saving info from a collection -
I have a collection made up of two different classes. I can loop through the collection writing all the information out to a text file for each item in the collection but how can I read the information back off the text file and back into a new collection?? If there is a better way


Sorting a custom collection -
How is it possible to sort a custom strongly typed collection by a specific field of an object? so I have a collection which is of type "Article" I now want to add article objects to this collection BUT when it adds the item, I want to sort the collection by a specific


Error in Collection whenever delete one item from collection!!! -
Hii everybody, I am trying to remove one of the item from the collection, any item not like first or last or in sequence. LIke i have collection of 4 items and i removed 2 second item. After that i am trying to add new with new Key value whcih for this example is 5(In sequence). The


For each and Collection object -
Hi, I have created a collection object which I have populated with data by using the add method. How can I traverse through the collection and show all information in the collection object using "For each" Thanks in advance MarkusJ


.NET collection classes -
So I'm in the middle of upgrading my l33t skillz from VB6, and after working on a study project, I pondered to myself: what is the correct way to do a collection class in .NET? In VB6, we can just throw a collection in an empty object form, and build it up from there. I see that we


clear a collection -
Hi I use a collection to count the number of occurence of each item inside my listbox,and I display my results inside labels(control array)but when I click on clear i want to clear all the content of my collection how can I clear my collection?