activate/deactivate button with macro at given condition
You could just do some validation at the start of your macro something along
the lines of:
If Cells(1, 1).Value < Cells(1, 2).Value Then
Exit Sub
Else
'Do all of
'this stuff
End If
You would probably also want to check that the two cells were not both empty
(which would mean their value properties would be the same).
Regards
Rowan
"arcq" wrote:
is there a way for me to activate/deactivate a button with an assigned
macro of a given condition? like, a macro can only run when value of
two cells are equal. this is to avoid running the macro if the data is
not correct.
thank you very much.
|