Hello. I am making a UserForm in Excel and I would like to add it some more functionality. I would like to set cursor to textbox when input is found incorrect after validation process. I tried with Activate function but I had no luck. Somewhere I heard that SetFocus could do the trick. Can you tell me something more about this function?
Excel SetFocus function can be used to accomplish functionality you want. When validation process finds invalid entry in one text box (for example TextBox1) then you can call SetFocus function like this: TextBox1.SetFocus and cursor will be placed in that text box. SetFocus only works on active user form so if you change focus it will not be able to position cursor correctly.