P
pburling
Thanks for taking the time to help.
I have values in two text boxes, Me.CALL and txt.LastCall.
The values in both boxes are separated with a forward slash.
For example, WCCC/WDDD/WEEE is in txt.CALL and
WXXX,WCCC,WEEE is in txt.Last Call.
I want to see if any of the values in txt.CALL are in txt.LastCALL. I
have done this using the Split function combined with the InStr
function. I split txt.Call and then check each value against
txt.LastCall.
This works fine. Code Below
I want to keep track of the number of times a string from txt.CALL is
found in txt.Last Call. To clarify, if WCCC is found I want a msg box
with "found 1 station" and then if WDDD is found I want the msg box to
show "found 2 stations" etc.
I would appreciate it if someone could suggest how to go about
this.....Thanks Peter
Private Sub TxtLastCall_Click()
Dim strCall
Dim strValue
strValue = Me.CALL
StrAryWords = Split(strValue, "/")
'strAryWords is now an array
Dim i
For i = 0 To UBound(StrAryWords)
If InStr(Me.TxtLastCall, StrAryWords(i)) = 0 Then
MsgBox (StrAryWords(i))
End If
Next
I have values in two text boxes, Me.CALL and txt.LastCall.
The values in both boxes are separated with a forward slash.
For example, WCCC/WDDD/WEEE is in txt.CALL and
WXXX,WCCC,WEEE is in txt.Last Call.
I want to see if any of the values in txt.CALL are in txt.LastCALL. I
have done this using the Split function combined with the InStr
function. I split txt.Call and then check each value against
txt.LastCall.
This works fine. Code Below
I want to keep track of the number of times a string from txt.CALL is
found in txt.Last Call. To clarify, if WCCC is found I want a msg box
with "found 1 station" and then if WDDD is found I want the msg box to
show "found 2 stations" etc.
I would appreciate it if someone could suggest how to go about
this.....Thanks Peter
Private Sub TxtLastCall_Click()
Dim strCall
Dim strValue
strValue = Me.CALL
StrAryWords = Split(strValue, "/")
'strAryWords is now an array
Dim i
For i = 0 To UBound(StrAryWords)
If InStr(Me.TxtLastCall, StrAryWords(i)) = 0 Then
MsgBox (StrAryWords(i))
End If
Next