Hello I'm trying to use the SetFocus function but when I do debug it gives error. So, depending on the validation of if and else in certain cases a msgbox appears that alerts the error and the user 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 soon to the missing field. Thanks