ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   validate all cells before save (https://www.excelbanter.com/excel-programming/382989-validate-all-cells-before-save.html)

Spencer

validate all cells before save
 
i have an application that used data validation to ensure that entries into
cells are valid...duh. however, i use macros to change the values of these
cells and the validation does not get picked up. is there a way to either
have this validation work when a macro changes a cell value or, maybe even
better, run a macro before the user saves the workbook that will validate all
of the cells. are eitehr of these possible? TIA.

Don Guillett

validate all cells before save
 
You could do either. Have a look in the vba help index for FINDNEXT

--
Don Guillett
SalesAid Software

"Spencer" wrote in message
...
i have an application that used data validation to ensure that entries into
cells are valid...duh. however, i use macros to change the values of
these
cells and the validation does not get picked up. is there a way to either
have this validation work when a macro changes a cell value or, maybe even
better, run a macro before the user saves the workbook that will validate
all
of the cells. are eitehr of these possible? TIA.




Spencer

validate all cells before save
 
ok...i see that i could loop through all my cells that contain data
validation, but how do i check the validity of the cells?

"Don Guillett" wrote:

You could do either. Have a look in the vba help index for FINDNEXT

--
Don Guillett
SalesAid Software

"Spencer" wrote in message
...
i have an application that used data validation to ensure that entries into
cells are valid...duh. however, i use macros to change the values of
these
cells and the validation does not get picked up. is there a way to either
have this validation work when a macro changes a cell value or, maybe even
better, run a macro before the user saves the workbook that will validate
all
of the cells. are eitehr of these possible? TIA.





Don Guillett

validate all cells before save
 
I guess you would have to check each cell against a list.

--
Don Guillett
SalesAid Software

"Spencer" wrote in message
...
ok...i see that i could loop through all my cells that contain data
validation, but how do i check the validity of the cells?

"Don Guillett" wrote:

You could do either. Have a look in the vba help index for FINDNEXT

--
Don Guillett
SalesAid Software

"Spencer" wrote in message
...
i have an application that used data validation to ensure that entries
into
cells are valid...duh. however, i use macros to change the values of
these
cells and the validation does not get picked up. is there a way to
either
have this validation work when a macro changes a cell value or, maybe
even
better, run a macro before the user saves the workbook that will
validate
all
of the cells. are eitehr of these possible? TIA.








All times are GMT +1. The time now is 01:38 PM.

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