Te dejo un ejemplo:
Código vb:
Ver originalPrivate Sub Command1_Click()
Dim a(4) As String
Dim i As Integer
Dim e As Boolean
a(0) = "A"
a(1) = "B"
a(2) = "C"
a(3) = "D"
i = 0
e = False
While i < 4 And Not e
If a(i) = Text1.Text Then
e = True
End If
i = i + 1
Wend
If e Then
Label1.Caption = Label1.Caption & "Encontrado: " & Text1.Text & " =" & i
End If
End Sub
Private Sub Form_Load()
Text1.Text = ""
Label1.Caption = ""
Command1.Caption = "Traducir"
End Sub
Un saludo!