View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Stuart[_21_] Stuart[_21_] is offline
external usenet poster
 
Posts: 154
Default Textbox/Userform question

Many thanks to you both.

Why, when the user is returned to the textbox, does the form not display
"from the top"?
(Presumably SetFocus controls this action, thus the textbox in question is
displayed top left in the window).
Can I display the form from the top, by default?

Regards.

"Mark Bigelow" wrote in message
oups.com...
Try:

If textbox1.value = "" Then
textbox1.setfocus
Exit Sub
ElseIf textbox2.value = "" Then
textbox2.setfocus
Exit Sub
ElseIf textbox3.value = "" Then
textbox3.setfocus
Exit Sub
End If

Let me know if you have any problems.

Mark

Stuart wrote:
If I show a form which has 3 crucial textboxes that must
have user data in them.....can I return them to an empty
textbox before they are permitted to exit?

Maybe something like Select Case?

Regards.