Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a userfrom that contains three combo box lists and 8 text boxes.
My user uses the comboboxes to select from lists of values. They then enter data in to the text boxes. Finally they select a save command button to save all the data to a row in a worksheet. I have set the tab order to go through the three combo boxes first then the text boxes. I have set the Text box EnterKeyBehavior proprty to False. Everything is fine if the user uses a mouse or the Tab Key. My problem is that if the user presses the Enter Key at any time the comboboxes are live the form immediately trys to Save. I want the Enter key behavior for the combo boxes to set focus to the next combobox or Text box but when I use the following code all that happens is I cannot edit the initial combobox, focus immediately goes to the one referenced in the code Private Sub cbbLocation_Enter() cbbFYear.SetFocus End Sub Any help would be appreciated. Thanks Peter |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One possibility owul be to have the SAVE Button set to:
CommandButton1.enabled = false UNTIL ALL Comboboxes and Textboxes contain values. You could use the : CommandButton1.enabled=True on the last Textbox to enable it again. Corey.... "belerephone" wrote in message ... I have a userfrom that contains three combo box lists and 8 text boxes. My user uses the comboboxes to select from lists of values. They then enter data in to the text boxes. Finally they select a save command button to save all the data to a row in a worksheet. I have set the tab order to go through the three combo boxes first then the text boxes. I have set the Text box EnterKeyBehavior proprty to False. Everything is fine if the user uses a mouse or the Tab Key. My problem is that if the user presses the Enter Key at any time the comboboxes are live the form immediately trys to Save. I want the Enter key behavior for the combo boxes to set focus to the next combobox or Text box but when I use the following code all that happens is I cannot edit the initial combobox, focus immediately goes to the one referenced in the code Private Sub cbbLocation_Enter() cbbFYear.SetFocus End Sub Any help would be appreciated. Thanks Peter |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
irrational userform/combobox behavior | Excel Programming | |||
Odd UserForm Behavior | Excel Programming | |||
Changing Behavior of the <Enter Key? | Excel Discussion (Misc queries) | |||
modify the behavior of the enter key? | Excel Programming | |||
Enter Key behavior with Userforms | Excel Programming |