0

Here is the goal. I have a document that I want to search through word by word based on an array of keywords.

I.E...

Dim keywords() = {"each", "it", "and", "I"}
Dim i As Integer
        For Each key As String In keywords
            Do Until i = Procedure.LastIndexOf(key)
                Search = Procedure.IndexOf(key)
                i = Procedure.IndexOf(key, i + 1)
                Select Case key
                Case "each"
                    MsgBox(key)
                Case "it"
                    MsgBox(key)
                Case "I"
                    MsgBox(key)
                Case "I"
                    MsgBox(key)
                Case Else
                    MsgBox(N/A)
            End Select
        Loop

From this point I want to select a case statement based on the current keyword and its position in a string. I've figured out to find each occurance of the key, but I want to be able to search for all keys at the same time in order of their occurance.

Any help is good help.

2
Contributors
1
Reply
3
Views
4 Years
Discussion Span
Last Post by Begginnerdev
This article has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.