Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I code to ensure that the user can't tab to the next control without
making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Jennifer, Setup your controls with the "TabStop" and the "Enabled" properties
initially set to false, then in the combobox change event, set them to true as needed: Private Sub ComboBox1_Change() If ComboBox1.Value = "My Criteria" Then CommandButton1.TabStop = True CommandButton1.Enabled = True End If End Sub -- Charles Chickering "A good example is twice the value of good advice." "JennLee" wrote: How do I code to ensure that the user can't tab to the next control without making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the exit event of the combobox to force an entry.
Private Sub ComboBox1_Exit(ByVal _ Cancel As MSForms.ReturnBoolean) if Combobox1.ListIndex = -1 or Combobox1.value = "" then Cancel = True msgbox "You must select an item" end if End Sub If the user uses the mouse and doesn't ever select the combobox, then this code will never fire. You would need some type of validation routine in the events related to commiting the data. -- Regards, Tom Ogilvy "JennLee" wrote: How do I code to ensure that the user can't tab to the next control without making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm just now able to apply these instructions and it worked beautifully!!
Just what I needed. Thanks so much for your guidance! -- Jennifer Lee IS Coordinator/App Support "Tom Ogilvy" wrote: Use the exit event of the combobox to force an entry. Private Sub ComboBox1_Exit(ByVal _ Cancel As MSForms.ReturnBoolean) if Combobox1.ListIndex = -1 or Combobox1.value = "" then Cancel = True msgbox "You must select an item" end if End Sub If the user uses the mouse and doesn't ever select the combobox, then this code will never fire. You would need some type of validation routine in the events related to commiting the data. -- Regards, Tom Ogilvy "JennLee" wrote: How do I code to ensure that the user can't tab to the next control without making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hopefully you see this
I am needing the same thing only my situation requires 1 of 3 checkboxes to be selected. If not then it won't advance. Validation is mentioned. How is this done? I can not get it to work. Thanks Matt "Tom Ogilvy" wrote: Use the exit event of the combobox to force an entry. Private Sub ComboBox1_Exit(ByVal _ Cancel As MSForms.ReturnBoolean) if Combobox1.ListIndex = -1 or Combobox1.value = "" then Cancel = True msgbox "You must select an item" end if End Sub If the user uses the mouse and doesn't ever select the combobox, then this code will never fire. You would need some type of validation routine in the events related to commiting the data. -- Regards, Tom Ogilvy "JennLee" wrote: How do I code to ensure that the user can't tab to the next control without making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you need exactly 1 of three options selected, why not drop the 3 checkboxes
and use 3 optionbuttons? That's the way they behave--no more than one can be chosen. Matt wrote: Hopefully you see this I am needing the same thing only my situation requires 1 of 3 checkboxes to be selected. If not then it won't advance. Validation is mentioned. How is this done? I can not get it to work. Thanks Matt "Tom Ogilvy" wrote: Use the exit event of the combobox to force an entry. Private Sub ComboBox1_Exit(ByVal _ Cancel As MSForms.ReturnBoolean) if Combobox1.ListIndex = -1 or Combobox1.value = "" then Cancel = True msgbox "You must select an item" end if End Sub If the user uses the mouse and doesn't ever select the combobox, then this code will never fire. You would need some type of validation routine in the events related to commiting the data. -- Regards, Tom Ogilvy "JennLee" wrote: How do I code to ensure that the user can't tab to the next control without making a choice in current control? It's pertinent that they don't skip some of my controls when entering their data. Thanks in advance for any guidance -- Jennifer Lee IS Coordinator/App Support -- Dave Peterson |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Actually it can be any one of the person would choose 1 or 2 items.
"Register only", "SCOTA Info", "Update Email" Both infos could be chosen or "register only" would be chosen. This is being used for a booth at Hamvention. Then I will sort for an email list (x2). The "register only" would be used for total numbers only. Matt, kc8bew "Dave Peterson" wrote: If you need exactly 1 of three options selected, why not drop the 3 checkboxes and use 3 optionbuttons? That's the way they behave--no more than one can be chosen. Matt wrote: Hopefully you see this I am needing the same thing only my situation requires 1 of 3 checkboxes to be selected. If not then it won't advance. Validation is mentioned. How is this done? I can not get it to work. Thanks Matt |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Never mind. I am over thinking it. I am not going to require the selections.
Thanks, Matt |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Require an entry in a cell | Excel Discussion (Misc queries) | |||
How do I require data entry in a cell before moving to the next ce | Excel Worksheet Functions | |||
Require Cell Entry based on condition | Excel Programming | |||
Require alpha-numeric entry | Excel Worksheet Functions | |||
Require cell entry | Excel Programming |