stop macro from running everytime a cell is changed

B

bassfisher

hello
HELP!! i am attempting to stop this macro from running everytime a cell is
changed other than the target cell !!


i am running the following macro,

Private Sub Worksheet_Change(ByVal Target As Range)

If Range("FE11") = 1 Then
MsgBox "VEHICLE MAY BE DUE FOR A SERVICE !!", vbBEEP + vbOKOnly
End If

End Sub

i am a newbie to programming and can't figure out how to stop it from
running everytime any cell value is changed in the worksheet other than the
target cell "FE11" !

and is there a way to put a date in my message that is located in cell
"FE12" ?

any help would be aprreciated

thanks in advance

bassfisher
 
J

Jerry W. Lewis

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$FE$11" Then
' your code
End If
End Sub

Jerry
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top