Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox
How do I get a curser to move to a textbox in a userform when a button is
clicked? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Textbox
I created a UserForm with three text boxes. Then I used the initialize event
to put the cursor in TextBox3, I used double click events in TextBox 3 and 2 to move the cursor to TextBoxes 2 and 1 respectively. Then a double click event in TextBox1 to close the UserForm. Here is the code behind the UserForm: Private Sub TextBox1_DblClick(ByVal Cancel As MSForms.ReturnBoolean) Unload Me End Sub Private Sub TextBox2_DblClick(ByVal Cancel As MSForms.ReturnBoolean) TextBox1.SetFocus End Sub Private Sub TextBox3_DblClick(ByVal Cancel As MSForms.ReturnBoolean) TextBox2.SetFocus End Sub Private Sub UserForm_Initialize() Me.TextBox3.SetFocus End Sub Of course, the UserForm1.Show command is issued from the standard code module. "ranswrt" wrote: How do I get a curser to move to a textbox in a userform when a button is clicked? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
HELP! I Lost The Ability To Advance From TextBox To TextBox With the ENTER Or The TAB Keys | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
Textbox Bug? Missing/delayed update of textbox filled via VBA | Excel Programming | |||
How to move cursor from one textbox control to another textbox con | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |