Results 1 to 3 of 3

Thread: Worksheet Change Event

  1. #1
    Member
    Join Date
    Dec 2012
    Posts
    43
    Rep Power
    0

    Worksheet Change Event

    Dear Gurus,

    i have question, can a macro be run if a particular cell value would be changed?


    for instance Cell A2 Value is = Interim Report and if the value is changed to Final Report then a macro should run for instance a msgbox to pop "Text Changed"

    would this be possible?


    thanks.

  2. #2
    Senior Member LalitPandey87's Avatar
    Join Date
    Sep 2011
    Posts
    222
    Rep Power
    14
    Step1:- Right click on sheet1 tab and click on View code
    Step2:- Paste below code

    Code:
    	Private Sub Worksheet_Change(ByVal Target As Range)
    	
    	    If Target.Address(0, 0) = "A2" Then
    	        MsgBox "Text changed.", vbInformation, "Text changed message..."
    	    End If
    	
    	End Sub

  3. #3
    Member
    Join Date
    Dec 2012
    Posts
    43
    Rep Power
    0
    Pandey,

    this was very helpful. you should be MVP of excel. thanks very much. Happy New Year!

    Quote Originally Posted by LalitPandey87 View Post
    Step1:- Right click on sheet1 tab and click on View code
    Step2:- Paste below code

    Code:
    	Private Sub Worksheet_Change(ByVal Target As Range)
    	
    	    If Target.Address(0, 0) = "A2" Then
    	        MsgBox "Text changed.", vbInformation, "Text changed message..."
    	    End If
    	
    	End Sub

Similar Threads

  1. Replies: 8
    Last Post: 04-16-2013, 02:04 PM
  2. Change Display Range Based On Change of Dropdown Values
    By rich_cirillo in forum Excel Help
    Replies: 2
    Last Post: 03-29-2013, 04:58 AM
  3. Print Nth Worksheet To Mth Worksheet using VBA
    By Ryan_Bernal in forum Excel Help
    Replies: 2
    Last Post: 02-28-2013, 06:57 PM
  4. Worksheet_Change event
    By Excelfun in forum Excel Help
    Replies: 2
    Last Post: 11-21-2012, 07:24 AM
  5. help with after insert event in Access 10
    By richlyn in forum Access Help
    Replies: 9
    Last Post: 03-03-2012, 10:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •