I am ready to leap...I could swear that I have done this before but for the life of me I can not make this work.
On userform the user can enter a name to be removed from a list. User enters a last name and clicks button. Routine searchs for name, if not found presents an error message and exits sub. I want the entered text to be highlighted but I can not make it happen.
<pre> sNoGoMsg = "The entry " & frmAddRemove.txtLast & " could not be found." & vbCrLf
sNoGoMsg = sNoGoMsg & "Please verify spelling of last name."
MsgBox sNoGoMsg, vbExclamation, "Invalid Entry"
.SelLength = Len(frmAddRemove.txtLast.Text)
I have played with seltext, selstart, set focus plus various combinations of them all. There are other textboxs on the form but they are disabled for a remove action. The EnterFieldBehaviorSelectAll does what is desired but we never LEAVE the textbox. Is the answer staring me in the face?
<img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>