How does data validation work

D

Dean

I had a cell which, using data, then validation, was set up to allow either
0 or 1 as input values. I also wrote a macro that would hide many rows if
you wanted a value of 0. Since I feared that some users would forget to set
it to 0 before hiding the rows (something that is critical), I had the macro
first query the user if he really wanted to choose 0 and hide the rows.
Then, if he chose yes, before hiding the rows, it would set that cell to
zero. The part of the macro that did this was:

Range("MinorityPartnerMode").Select
ActiveCell.Formula = 0

Later, I decided that choices of Yes or No would be better than 1 or 0. So,
I changed the list in data, then validation. And I changed the EXCEL code
to match. However, I forgot to edit the macro. To my surprise, the macro
did not crash, even though 0 is now not an allowed response. This leads me
to conclude that data validation only limits choices typed directly into a
cell and that changing the cell value via macro, somehow, circumvents the
limitation. Is this true (EXCEL 2003)?

Thanks!
Dean
 
D

Dean

Thanks, Tom. Any chance you answer my solver problem? I could even e-mail
you the worksheet.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top