Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Meenachi Suppiah   on Dec 21 In MS Office Category.

  
Question Answered By: Darwishi Massri   on Dec 21

right click on the tab of the sheet concerned and click 'view code'.
Enter the following:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = Range("C14").Address Then
MsgBox "code for macro, or call macro  here"
End If
End Sub

This will run  whenever a cell  changes on the sheet, but will bring up
the message box only when cell C14 is changed.

Be aware that some actions which should trigger the event don't, while
some that you think shouldn't do. From J Walkenbach:
Changing the formatting of a cell does not.
Edit|Clear Formats does
Edit|Fill does not, whereas using Autofill does.
Edit|Delete does not. Pressing the Del key does; even if the cell is
already empty.
Data|Form, Data|Sort, Tools|Spelling, Edit|Replace don't.
Changes made by VBA do.

Share: 

 
 
Didn't find what you were looking for? Find more on Excel VBA Check When Cell Has Changed Or get search suggestion and latest updates.


Tagged: