Question : Validation Giving Inconsistent Results

In this worksheet you will see that the test cells have a validation list with values -1,0,1.
The cell on top has a basic number format.
The cell on bottom has a custom number format.
I can use the dropdown to enter the same value into both cells with no validation error.
However, If I check the validation status with VBA, I get different results.
? ActiveCell.Validation.Value gives me True for the top cell, False for the bottom.  Why?

Mike



Answer : Validation Giving Inconsistent Results

Mike,

It appears you have uncovered a bug. I tested in Excel 2007 and it is there as well. It only happens when you have a custom format with some string constant in it. I was able to get a single format to exhibit both behaviors:

0.0 "D";0.0

A 1 results in Value = False, and a -1 results in Value = True.

I have filed a bug with Microsoft.

Kevin
Random Solutions  
 
programming4us programming4us