Conditional action on cell entry


Posted by John on November 19, 2001 9:10 AM

Is it possible to have a routine that continuously scans a cell for an entry and when it is <> "" executes an action? If so, where can I put the code? If I create a module is that where I would put it?

John



Posted by bob Umlas on November 19, 2001 10:18 AM

You want to use the Worksheet_Change Event.
Right-click the sheet tab & select View Code. IN the left dropdown (which says "General"), select Worksheet. The right will change to the "SelectionChange" event. You don't want this. Select the Change event from the right dropdown.
You can then do this: (assumes C6 is that special cell to take action on):
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$6" Then DoMyRoutine
End Sub