Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
activate/deactivate macro depending on who's the user | Excel Discussion (Misc queries) | |||
Links is in gray color (deactivate). How can I activate? | Excel Discussion (Misc queries) | |||
button in a cell to activate a macro | Excel Worksheet Functions | |||
Macro to activate form button | Excel Programming | |||
Activate / Deactivate mouse move event | Excel Programming |