Thread: macro auto run
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
patrick molloy patrick molloy is offline
external usenet poster
 
Posts: 391
Default macro auto run

If is a conditional test, and can be in a sheet function
or in code.
In a sheet function, only the content of the calling cell
can be changed - a sheet function cannot alter th evalues
in other cells.

In code, your IF can be in a procedure - sub if you will-
where the called routine can pretty much do whatever you
want.

Now, running a macro automatically means what? If yuo
want code to start when a workbook opens, then use a proc
called Auto_Open or use the workboook's Open event.
If you want code to run when a cell value changes, then
you coul duse the Sheet's Change event - this is fired
when a value is entered. ou could also use the workbook's
SheetCalculate event that is fired when a sheet is
calculated.

Patrick Molloy
Microsoft Excel MVP


-----Original Message-----
is it possible to have a macro run automatically using

an "if" statement
?


---
Message posted from http://www.ExcelForum.com/

.