View Single Post
 
Old 07-13-2020, 05:31 PM
Visor Visor is offline Windows 10 Office 2013
Advanced Beginner
 
Join Date: Aug 2019
Posts: 38
Visor is on a distinguished road
Default Check if a word exists in a list of words established in the vba code

Greetings friends of the forum
I have a Textbox1 and I need the word that is entered there to be compared with a group of words that I have put in the vba code if this word matches one of them, then give me a message saying that the word does exist, otherwise it says this word does not exist.
I have this

HTML Code:
Private Sub CommandButton1_Click()

Dim nivbajo(19) As Variant
Dim palabra() As String
Dim letra() As String
Dim numeroletras As Integer

nivbajo = Array("Calcar", "Citar", "Encontrar", "Enumerar", "Etiquetar", "Fijar", "Localizar", "Memorizar", "Mostrar", "Recitar", "Recordar", "Relatar", "Repetir", "Reproducir", "Seņalar", "Subrayar", "Comentar", "Describir", "Determinar", "Dibujar", "Diferenciar", "Explicar", "Expresar", "Generalizar", "Identificar", "Ilustrar", "Informar", "Leer", "Observar", "Parafrasear", "Reconocer", "Resumir", "Revisar", "Secuenciar", "Sintetizar")

For k = 0 To 18
         For j = 1 To numeroletras
          letra(j) = Mid(palabra(i), j, 1)
          Texbox1 = InStr(letra(j), nivbajo (k), 1)
If tbxVerbo <> 0 Then
suma = suma + 1
End If
MsgBox "Si Existe ese verbo:" & suma
          Next j
 Next k
MsgBox "No Existe ese verbo:" & suma

End Sub
I hope you can help me with this topic
I thank you in advance for your support
Reply With Quote