View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chris Chris is offline
external usenet poster
 
Posts: 244
Default Auto execute a macro if a cell value=1 ?

use the worksheet change event

Private Sub Worksheet_Change(ByVal Target As Range
Set i = Application.Intersect(Target, Range("B3")
If Not i Is Nothing and Target.value = 1 then Macro
End sub

Why in the world would anyone want a Macro to run every 60 s.
I suggest you find another solution. Macros dont make good background processes

But i think u would need to do a recursive OnTime Method (look in VB help

----- Sven wrote: ----

Hi,
How does the VBA code looks like for the following

Task
Execute a macro called €śMacroX€ť if cell B3=

In other words: I would like to automatically run a macro calle
€śMacroX€ť only if the cell B3 equals 1.00

Additional question
Is it possible to set so that the macro run every 60 seconds if cell B
equals

Many thank
Sve


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