![]() |
Can a macro be made to work based on a formula?
Is it possible to have a macro run based on the answer to a question? If the
answer to a certain question is yes then the macro would run. |
A formula in a worksheet cell can call a function written in VBA. But that
function can only return a result to the cell containing the formula, just like the built-in functions like SUM and AVERAGE do. The code can't change other cells, do formatting, etc. On Tue, 25 Jan 2005 18:59:04 -0800, "lonnied" wrote: Is it possible to have a macro run based on the answer to a question? If the answer to a certain question is yes then the macro would run. |
Addendum: a Worksheet event macro like Worksheet_Calculate or Worksheet_Change
can monitor the results in a given cell and run more code if the value meets your criteria. On Tue, 25 Jan 2005 21:57:45 -0600, Myrna Larson wrote: A formula in a worksheet cell can call a function written in VBA. But that function can only return a result to the cell containing the formula, just like the built-in functions like SUM and AVERAGE do. The code can't change other cells, do formatting, etc. On Tue, 25 Jan 2005 18:59:04 -0800, "lonnied" wrote: Is it possible to have a macro run based on the answer to a question? If the answer to a certain question is yes then the macro would run. |
All times are GMT +1. The time now is 04:19 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com