Hi,Originally Posted by Sharp
why not just test the condition that would cause the Format to display Red?
---
Hi,Originally Posted by Sharp
why not just test the condition that would cause the Format to display Red?
---
Si fractum non sit, noli id reficere.
Hi,
thanks...
sorry not very good with VBA code...could you be more specific
thanks
I think he means to use the same test that the conditional formatting uses.
For example, if the conditional formatting turns a cell Red when the number is negative, then you test the cell contents for negative numbers before allowing a save.
Oh...
the problem with that is the cell may turn red, depending on the data in a number of other cells. Sometimes it may be ok to be empty and other times it may not.
For example;
If cell 'A1' is YES then 'B1' needs to have a number in it and conditional formatting will turn 'B1' red until a number is empty.
If cell 'A1' is NO then 'B1' doesn't need to have a number in it and conditional formatting will not activate and the cell can be left empty
Hi,Originally Posted by Sharp
so whatever code is in the Conditional Format formula for 'Red' needs to be used in your 'before_close' routine, where something like If UCase(Cells(1,1).value) = "YES" And Cells(1,2).value <> "" then should go close.
hth
---
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks