Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Need ComboBox to require entry before moving to next control

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 516
Default Need ComboBox to require entry before moving to next control

Never mind. I am over thinking it. I am not going to require the selections.

Thanks,
Matt
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Require an entry in a cell Erika Excel Discussion (Misc queries) 3 September 25th 09 09:15 PM
How do I require data entry in a cell before moving to the next ce CindyB Excel Worksheet Functions 3 April 26th 08 04:18 PM
Require Cell Entry based on condition Kathy - Lovullo Excel Programming 3 January 13th 06 03:02 PM
Require alpha-numeric entry Dana Excel Worksheet Functions 3 September 7th 05 07:53 AM
Require cell entry Bernie Deitrick Excel Programming 0 June 24th 04 02:43 PM


All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"