ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combobox and data validation (https://www.excelbanter.com/excel-discussion-misc-queries/109161-combobox-data-validation.html)

GlenC

Combobox and data validation
 
Having some problems with this so I've been reviewing the "Contextures"
tutorials.
With the "DataValCombobox.xls" sample file, I entered an item (in the Combo
box) not on the list and when I clicked on another cell it accepted the bad
name. If I try to make the same error in the validation dropdown list (not
doubleclicked cell) it's not allowed.

Can anyone tell me how to ensure that the combobox entries are validated
when the box is left?

Also, is there a way to exit the Combo box with keystrokes and not have to
use the mouse to select another cell?
--
Glen

JLatham

Combobox and data validation
 
You might look at their
http://www.contextures.com/DataValComboCheck.zip file instead, although that
one seems to be problematic - I get an "not valid for cell..." message even
when choosing from the provided list.

But it should give you an idea of what's going on - choose from the combo
box and it tosses your entry into the cell which has been set up with data
validation and it is the one that actually tosses up the invalid alert
message.

As for moving out of one of those without clicking elsewhere, I don't know
how.

One thing you might look at is using the Combo box from the Forms toolbar,
which can be directly tied to a list and which pretty much forces you to
select from the list so the validating is unnecessary.


"GlenC" wrote:

Having some problems with this so I've been reviewing the "Contextures"
tutorials.
With the "DataValCombobox.xls" sample file, I entered an item (in the Combo
box) not on the list and when I clicked on another cell it accepted the bad
name. If I try to make the same error in the validation dropdown list (not
doubleclicked cell) it's not allowed.

Can anyone tell me how to ensure that the combobox entries are validated
when the box is left?

Also, is there a way to exit the Combo box with keystrokes and not have to
use the mouse to select another cell?
--
Glen


GlenC

Combobox and data validation
 
Thanks for the tips. Your description, "choose from the combo
box and it tosses your entry into the cell which has been set up with data
validation and it is the one that actually tosses up the invalid alert
message.", is what I wanted, but that's not the way the sample program
works. It takes the cell you want to validate and counts the occurences of
the cell contents in the validation list and gives an error message if not
found.

I discovered that the {Esc} key will exit from the combo box leaving your
selection in the target cell, but this is awkward to use and bypasses the
validation.

What I want to do is for when the user selects a cell, a combo box based on
the field name pops up for better viewing and autocomplete, after a couple of
keystrokes the selection is complete and a {Tab} or {Enter} key will populate
the cell and it will be validated and move to the next cell. I have the data
validation and movement working OK but the ComboBox is driving me batty.

Glen



"JLatham" wrote:

You might look at their
http://www.contextures.com/DataValComboCheck.zip file instead, although that
one seems to be problematic - I get an "not valid for cell..." message even
when choosing from the provided list.

But it should give you an idea of what's going on - choose from the combo
box and it tosses your entry into the cell which has been set up with data
validation and it is the one that actually tosses up the invalid alert
message.

As for moving out of one of those without clicking elsewhere, I don't know
how.

One thing you might look at is using the Combo box from the Forms toolbar,
which can be directly tied to a list and which pretty much forces you to
select from the list so the validating is unnecessary.


"GlenC" wrote:

Having some problems with this so I've been reviewing the "Contextures"
tutorials.
With the "DataValCombobox.xls" sample file, I entered an item (in the Combo
box) not on the list and when I clicked on another cell it accepted the bad
name. If I try to make the same error in the validation dropdown list (not
doubleclicked cell) it's not allowed.

Can anyone tell me how to ensure that the combobox entries are validated
when the box is left?

Also, is there a way to exit the Combo box with keystrokes and not have to
use the mouse to select another cell?
--
Glen



All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com