Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setfocus question
Hi,
I have 5 textboxes on a multipage control. In 4 of the textboxes, the user should enter his details only once, while in the fifth textbox the user should reply a question and click the OK button. No matter what was his answer, he gets new question and the focus shouls be back to the fifth textbox in order to reply the next question. My problem is that I want that the user will be able to send his answers not only by clicking the OK button but also by clicking 'Enter' after typing the answer to the textbox, and I can't get the focus in the fifth textbox after answering. Thanks in advance for your help! Eli |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setfocus question
For your command button. In the VBE click the command button and set the
Default property to True. This will allow the user to hit enter and your command button will be clicked. I would put this in your command button Click Event. Hope this helps! If so, let me know, click "YES" below. Private Sub CommandButton1_Click() ' do something TextBox5.SetFocus End Sub -- Cheers, Ryan "אלי" wrote: Hi, I have 5 textboxes on a multipage control. In 4 of the textboxes, the user should enter his details only once, while in the fifth textbox the user should reply a question and click the OK button. No matter what was his answer, he gets new question and the focus shouls be back to the fifth textbox in order to reply the next question. My problem is that I want that the user will be able to send his answers not only by clicking the OK button but also by clicking 'Enter' after typing the answer to the textbox, and I can't get the focus in the fifth textbox after answering. Thanks in advance for your help! Eli |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Setfocus question
Thanks a lot!!
"Ryan H" wrote: For your command button. In the VBE click the command button and set the Default property to True. This will allow the user to hit enter and your command button will be clicked. I would put this in your command button Click Event. Hope this helps! If so, let me know, click "YES" below. Private Sub CommandButton1_Click() ' do something TextBox5.SetFocus End Sub -- Cheers, Ryan "אלי" wrote: Hi, I have 5 textboxes on a multipage control. In 4 of the textboxes, the user should enter his details only once, while in the fifth textbox the user should reply a question and click the OK button. No matter what was his answer, he gets new question and the focus shouls be back to the fifth textbox in order to reply the next question. My problem is that I want that the user will be able to send his answers not only by clicking the OK button but also by clicking 'Enter' after typing the answer to the textbox, and I can't get the focus in the fifth textbox after answering. Thanks in advance for your help! Eli |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
SetFocus question | Excel Programming | |||
setfocus | Excel Programming | |||
userform setfocus question | Excel Programming | |||
SetFocus Question | Excel Programming | |||
UserForm1.Textbox1.SetFocus Question | Excel Programming |