Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
running macros
Can a macro be run from within a formula?
I would like to run macro A if a cell contains 0 or macro B if that cell contains anything else. I know how to setup the NOT formula, but how do you program arguments to get the macros to run? Is there a way to do that? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
running macros
hi.
short answer....no. you can write functions in vba that the cell can call but these functions return value and cannot perform actions. you might be able to use the worksheet change event to fire a macro but only if the value in the cell is changed manually. it will not fire with a formula change. There is the calculation event but that would probable fire your macro every time the sheet recalculated. (eeee!) so if you could provide a bit more info as to what your are trying to do, someone might be able to suggest a alternative course of actions. Regards FSt1 "piglaup" wrote: Can a macro be run from within a formula? I would like to run macro A if a cell contains 0 or macro B if that cell contains anything else. I know how to setup the NOT formula, but how do you program arguments to get the macros to run? Is there a way to do that? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
running macros
You can use the Workbook_SheetCalculate event or Workbook_SheetChange event
to check the value and call the appropriate macro If this post helps click Yes --------------- Jacob Skaria "piglaup" wrote: Can a macro be run from within a formula? I would like to run macro A if a cell contains 0 or macro B if that cell contains anything else. I know how to setup the NOT formula, but how do you program arguments to get the macros to run? Is there a way to do that? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Running Macros | Excel Programming | |||
Macros not running | Excel Programming | |||
Running Macros | Excel Programming | |||
Running Win Macros on Mac | Excel Programming | |||
HELP: Running two Macros, one before the other | Excel Programming |