Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-13-2020, 05:31 PM
Visor Visor is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2013
Advanced Beginner
Check if a word exists in a list of words established in the vba code
 
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
  #2  
Old 07-13-2020, 05:40 PM
gmaxey gmaxey is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Code:
Private Sub CommandButton1_Click()
Dim palabra As String
  palabra = "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"
  If InStr(palabra, TextBox1) > 0 Then
    MsgBox "Si Existe ese verbo:" & TextBox1
  Else
    MsgBox "No Existe ese verbo:" & TextBox1
  End If
End Sub
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #3  
Old 07-13-2020, 10:50 PM
Visor Visor is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2013
Advanced Beginner
Check if a word exists in a list of words established in the vba code
 
Join Date: Aug 2019
Posts: 38
Visor is on a distinguished road
Default

Excelente funciona perfecto!! Estoy muy agradecido,... Pero pensé que lo podía adaptar a como lo requiero, no obstante no lo he logrado... En realidad tengo tres grupos de palabras verbos Nivel bajo, Nivel medio y Nivel alto y no me permite distinguir con Elseif pensé que si podría, aqui pongo los tres niveles de verbo

HTML Code:
'nivel bajo
Dim palabranb As String
  palabranb = "Conocer,Comprender,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"
  If InStr(palabranb, TextBox1) > 0 Then
      MsgBox "El verbo: " & TextBox1 & " es de nivel bajo"


'nivel medio
Dim palabranm As String
    palabranm = "Aplicar,Analizar,Comparar,Confeccionar,Demostrar,Desarrollar,Dramatizar,Ejecutar,Ejemplificar,Ejercitar,Emplear,Fomentar,Hacer,Interpretar,Manipular,Modificar,Operar,Organizar,Practicar,Predecir,Realizar,Reestructurar,usar,Aclamar,Calcular,Concluir,Constatar,Cuestionar,Debatir,Desarmar,Descubrir,Desmenuzar,Destacar,Diagramar,Discriminar,Distinguir,Enfocar,Examinar,Experimentar,Inferir,Inspeccionar,Probar,Relacionar,Resolver"

  ElseIf InStr(palabranm, TextBox1) > 0 Then
    MsgBox "El verbo: " & TextBox1 & " es de nivel medio"
    

'nivel alto
Dim palabrana As String
  palabrana = "Evaluar,Crear,Argumentar,Asignar valor,Coleccionar,Comprobar,Considerar,Decidir,Discutir,Elegir,Especificar,Estimar,Formular,Hipotetizar,Integrar,Investigar,Justificar,Juzgar,Medir,Preferir,Priorizar,Recopilar,Tipificar,Validar,Valorar,Actualizar,Componer,Construir,Deducir,Diseñar,Elaborar,Ensamblar,Escribir,Fabricar,Idear,Imaginar,Intuir,Inventar,Manejar,Modelar,Ordenar,Producir,Programar,Proponer,Reconstruir"

  ElseIf InStr(palabrana, TextBox1) > 0 Then
      MsgBox "El verbo: " & TextBox1 & " es de nivel Alto"

  Else
    MsgBox "No Existe el verbo: " & TextBox1 & " en la Taxonomía de Bloom"
Exit Sub
    
  End If
Podrías echarle un vistazo nuevamente??
Reply With Quote
  #4  
Old 07-14-2020, 04:40 AM
Visor Visor is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2013
Advanced Beginner
Check if a word exists in a list of words established in the vba code
 
Join Date: Aug 2019
Posts: 38
Visor is on a distinguished road
Default

I'm sorry!!

Excellent works perfect !! I am very grateful, ... But I thought I could adapt it to the way I require it, however I have not succeeded ... Actually I have three groups of verbs Low level, Medium level and High level and it does not allow me to distinguish with Elseif I thought that if I could, here I put the three verb levels

I put the code in the previous post

Podrías echarle un vistazo nuevamente??

Quote:
Originally Posted by gmaxey View Post
Code:
Private Sub CommandButton1_Click()
Dim palabra As String
  palabra = "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"
  If InStr(palabra, TextBox1) > 0 Then
    MsgBox "Si Existe ese verbo:" & TextBox1
  Else
    MsgBox "No Existe ese verbo:" & TextBox1
  End If
End Sub
Reply With Quote
  #5  
Old 07-14-2020, 04:53 AM
gmaxey gmaxey is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Not test, but it seems this should work:

Code:
Dim palabranb As String, palabrana As String, palabranm As String
  palabranb = "Conocer,Comprender,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"
  palabrana = "Evaluar,Crear,Argumentar,Asignar valor,Coleccionar,Comprobar,Considerar,Decidir,Discutir,Elegir,Especificar,Estimar,Formular,Hipotetizar,Integrar,Investigar,Justificar,Juzgar,Medir,Preferir,Priorizar,Recopilar,Tipificar,Validar,Valorar,Actualizar,Componer,Construir,Deducir,Diseñar,Elaborar,Ensamblar,Escribir,Fabricar,Idear,Imaginar,Intuir,Inventar,Manejar,Modelar,Ordenar,Producir,Programar,Proponer,Reconstruir"
  palabranm = "Aplicar,Analizar,Comparar,Confeccionar,Demostrar,Desarrollar,Dramatizar,Ejecutar,Ejemplificar,Ejercitar,Emplear,Fomentar,Hacer,Interpretar,Manipular,Modificar,Operar,Organizar,Practicar,Predecir,Realizar,Reestructurar,usar,Aclamar,Calcular,Concluir,Constatar,Cuestionar,Debatir,Desarmar,Descubrir,Desmenuzar,Destacar,Diagramar,Discriminar,Distinguir,Enfocar,Examinar,Experimentar,Inferir,Inspeccionar,Probar,Relacionar,Resolver"
  
  Select Case True
    Case InStr(palabranb, TextBox1) > 0: MsgBox "El verbo: " & TextBox1 & " es de nivel bajo"
    Case InStr(palabranm, TextBox1) > 0: MsgBox "El verbo: " & TextBox1 & " es de nivel medio"
    Case InStr(palabrana, TextBox1) > 0: MsgBox "El verbo: " & TextBox1 & " es de nivel Alto"
    Case Else
      MsgBox "No Existe el verbo: " & TextBox1 & " en la Taxonomía de Bloom"
  End Select
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #6  
Old 07-14-2020, 07:41 AM
Visor Visor is offline Check if a word exists in a list of words established in the vba code Windows 10 Check if a word exists in a list of words established in the vba code Office 2013
Advanced Beginner
Check if a word exists in a list of words established in the vba code
 
Join Date: Aug 2019
Posts: 38
Visor is on a distinguished road
Default

Excellent, great, everything worked very well, I am truly very grateful ... This tool is for choosing verbs according to the level of complexity in the evolution of learning
Reply With Quote
Reply

Tags
formulario, vba, word 2013

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check if a word exists in a list of words established in the vba code check for duplicates of a word within next 100 words sylvio Word VBA 19 06-27-2023 04:10 PM
Check if a word exists in a list of words established in the vba code Pass each of the rows from Excel to Word rtf in paragraphs in established order Visor Word VBA 5 06-30-2020 02:19 AM
How to find (highlight) two and more words in a list of 75k single words in Word 2010 Usora Word 8 05-29-2018 03:34 AM
Check if a word exists in a list of words established in the vba code Check if named Content Control field exists and add missing sylvio Word VBA 2 08-29-2017 04:08 AM
Check if a word exists in a list of words established in the vba code VBA Code for Grammar Check Not Working in Word 2016 PSSMargaret Word VBA 2 06-11-2016 10:53 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:47 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft