View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default UserForm Textbox.setfocus help

I misread your post, disregard my previous suggestion.

"JMay" wrote:

The following code is not consistent; The focus is set ONLY the FIRST TIME I
activate the Worksheet - If I lease WS (Deactivate - UserForm1.hide) and
return to WS (Below) my textbox1 DOES NOT GET THE FOCUS.. What am I missing?

Private Sub Worksheet_Activate()
With UserForm1
.TextBox1.Value = ""
.TextBox2.Value = ""
.TextBox3.Value = ""
.Show vbModeless
.TextBox1.SetFocus ' This line not being consistent
End With
End Sub