Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SetFocus to first textbox on userform upon Userform1.Show
I have Userform1 containing several textboxes. When I first open the Excel file and open the Userform for the first time, the cursor correctly appears in the first textbox (Textbox1). However, if I exit the Userform and then go back in, the cursor appears in another Textbox instead of Textbox1. In fact, each time I exit the Userform and go back in, the cursor is in a different Textbox. (The TabIndex of Textbox1 is set to 0.
I've seen answers to several posts here giving a solution of Userform1.Textbox1.SetFocus. I've put that line in the Private Sub UserForm_Initialize() code, but it has not affect What code can I use so that whenever I open (show) Userform1, the cursor is always in Textbox1, and where do I place such code Many thanks Pau |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel VB - show userform1 (at same time) minimized application win | Excel Discussion (Misc queries) | |||
UserForm1.Textbox1.SetFocus Question | Excel Programming | |||
TextBox SetFocus Problem | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming | |||
TextBox.SetFocus | Excel Programming |