|
-
Jun 10th, 2003, 08:15 PM
#1
Thread Starter
Member
Search Array List With Structure
Help Please---I'm a teacher and I wrote a program to help my students work on their reading skills--the gist of the problem is I have a a group of words being read into a structure then added to an array list--ReadWordList is the structure ReadWord is the array list. ---see snippet below
While mReader1.Read
With ReadWordList 'fill structure first
.Item = mReader1.GetString(1) 'word
.Sounds = mReader1.GetString(2) 'word divided into sounds
.Syll = mReader1.GetString(3) 'word divided by syllables
End With
ReadWord.Add(ReadWordList) 'fill array list with structure
End While
I know the array list gets filled and can access the structure ---problem ---how do I search for a specific word in the ReadWord array list?
I used the following function call but it won't work
Function FindTheSeekWord(ByVal stWord As String) As String
Dim i As Integer
i = ReadWord.IndexOf(stWord)
If i >= 0 Then
Return ReadWord(i).sound
Else
MessageBox.Show("no Match")
End If
End Function
any suggestions??
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
|