
Can a macro be liked to a cell?
If I understand what you want, you set an Event for the worksheet.
To do this,
First bring up the Visual Basic Editor ([ALT][F11])
The Project window is at the top left of your screen. Double-click on
Sheet1, or whatever your worksheet happens to be.
Now, if you were writing the routine from scratch, you'd select Worksheet
from the left-hand dropdown of the Module window, and Change from the
right-hand dropdown. However, you can just copy this routine:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$N$29" And Target = 1 Then
MsgBox "Condition met"
End If
End Sub
Hope this is clear.
Stan Scott
New York City
Quote:
> Can I make a macro run everytime a cell's content is filled with a
> specific number?
> In other words everytime a cell say N 29 is filled with the number 1 can
> I make a macro execute?
> I am just a newbie so please keep that in mind when you respond.
> Thank you very much,
> Bruce
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!