0
Hello I’m trying to use the Setfocus function but when I debug it gives error. Therefore, depending on if and Else validation in certain cases there is an msgbox that alerts to the error and when closing it I wanted to automatically select the box where the error is.
ElseIf txtFind.Text = "" Then
validacao = validacao + False
MsgBox("Please fill the XX!", MsgBoxStyle.Critical, "ERRO")
txtFind.Text.SetFocus
In short, if the field is empty the user receives an error and I want to forward it to the missing field. Thank you
Exactly what davidterra answered, you cannot set the focus to the Textbox property.
– Odilton Junior