Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro from IF function
Hi,
I want to run a macro from an if, how do I do this? Thanks Stu ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run macro from IF function
Stu,
Functions called from worksheet cells can only return a value; they cannot change the Excel environment in any way, including changing the value of any cell. The reason is that Excel must keep a model of what cells depend on what other cells, called the "dependency tree", in order to calculate cells in the proper order. Since Excel cannot know what cells might be modified by a VBA macro, it prevents you from changing any cell. So the short answer is that you can't do this. -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Stu" wrote in message ... Hi, I want to run a macro from an if, how do I do this? Thanks Stu ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Using A Function in a Macro | Excel Worksheet Functions | |||
Not sure what function, macro, etc to use | Excel Worksheet Functions | |||
Sub Macro vrs Function Macro Auto Start | Excel Discussion (Misc queries) | |||
Function or macro? | Excel Worksheet Functions | |||
Macro Function | Excel Worksheet Functions |