Data Validation in VBA

  • Thread starter Thread starter Hawk
  • Start date Start date
H

Hawk

Can you force the data validation of a cell to run in
VBA? I was hoping to be able to run the data validation
for a particular cell in the worksheet_change event.
 
Validation doesn't "run". It only operates when an entry is manually made in
a cell. It does not validate existing data (in the cell.).

An alternative would be to read the criteria in the validation and then use
that criteria to check the value in the cell.

The code on Chip Pearson's page, should be a good start:

http://www.cpearson.com/excel/CFColors.htm
 

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

Back
Top