Android Question case select dont works

fa_of

Member
tengo un problema con la condicion select case, comparo pero no funciona, adjunto mi codigo y una copia del programa que estoy trabajando

Sub txtSend_TextChanged (Old As String, New As String)
Select txtSend.text
Case "z"
Msgbox("sads","")
Case "a"
Msgbox("","")
Case " "
Msgbox("","")
End Select
End Sub
 

Attachments

sorry
I have a problem with the condition select case, but does not work compare, attached my code and a copy of the program I'm working

Sub txtSend_TextChanged (Old As String, New As String)
Select txtSend.text
Case "z"
Msgbox("sads","")
Case "a"
Msgbox("","")
Case " "
Msgbox("","")
End Select
End Sub
 

Attachments

Upvote 0
Hi fa_of,
you might use Erel's guide as picture.
 

Attachments

  • UsingRegex.png
    UsingRegex.png
    23.6 KB · Views: 457
Upvote 0
It could be that it is a upper/lower case issue try this:

Code: Copy
Select lcase(txtSend.text)
Case "z"
Msgbox("sads","")
Case "a"
Msgbox("","")
Case " "
Msgbox("","")
End Select
 
Upvote 0
I think it needs to be like this in order for it to work
Code: Copy
Sub txtSend_TextChanged (Old As String, New As String)
Select New
Case "z"
Msgbox("sads","")
Case "a"
Msgbox("","")
Case " "
Msgbox("","")
End Select
End Sub

Hopefully it works like this
 
Upvote 0
Back
Top