Current location: Hot Scripts Forums » Programming Languages » Visual Basic » Equivalent to Lotus LIST


Equivalent to Lotus LIST

Reply
  #1 (permalink)  
Old 04-02-09, 10:38 PM
goochy goochy is offline
New Member
 
Join Date: Apr 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Equivalent to Lotus LIST

Lotus Notes has a collection of objects that allows you to use a string to refer to the index.
Is there a VB6 equivalent function or a class that exists?

What I am doing is going through a grid controls contents that isn't sorted, building a string of values that the user has entered like;
(I'll separate the columns with commas for this example)

Make, Result
Ford, A
Ford, B
Ford, C
GMH , A
GMH, D

The resultant list will have; (I am using the ~ as a deliminator)
The code would say;
Code:
Car(Make) = Car(Make) & "~" & Result
Which if you debugged would look like;
Code:
Car("Ford")= "A~B~C"
Car("GMH")= "A~D"
The Lotus example is this in case my example above doesn't make sense.

Code:
' Make string comparison case insensitive
' in this module.
Option Compare NoCase
' Declare a list—myList—to hold first names.
' The list tags will be unique IDs.
Dim myList List As String
Dim newTag As String
Dim newValue As String
' Put some elements in the list.
myList("A1234") = "Andrea"
myList("A2345") = "Vera"
myList("A3456") = "Isabel"
' Ask the user to enter an ID and a name.
newTag$ = InputBox$("Please enter your ID:")
newValue$ = InputBox$("Please enter your first name:")
' Add a new element to the list with
' the user's ID as the list tag and the user's name as
' the value of the new element.
myList(newTag$) = newValue$
Print myList(newTag$)
' Output: the name that the user entered
Thanks for any assistance with this.

Last edited by digioz; 04-03-09 at 09:15 AM. Reason: Please use code tags.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Read from file, add to list Saturn Job Offers & Assistance 10 02-08-09 10:00 PM


All times are GMT -5. The time now is 01:18 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.