Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default Change Cell Event

How do I code an event change macro that triggers when cell A2 is
changed.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Change Cell Event

Option Explicit

Private Sub Worksheet_Change(ByVal Target As Range)

If Target = ActiveSheet.Range("$A$2") Then
MsgBox "Hello"
End If

End Sub

substitute the msgbox with your code.......
hope that helps!
:)
susan


On Nov 3, 12:19*pm, snax500 wrote:
How do I code an event change macro that triggers when cell A2 is
changed.

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Change Cell Event

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'Private Sub Worksheet_Calculate()
On Error GoTo stoppit
Application.EnableEvents = False
With Me.Range("A2")
If .Value < "" Then
MsgBox "A2 was just changed"
End If
End With
stoppit:
Application.EnableEvents = True
End Sub

Right-click on the sheet tab and "View Code"

Copy/paste into that sheet module. Edit to suit.


Gord Dibben MS Excel MVP


On Mon, 3 Nov 2008 09:19:06 -0800 (PST), snax500
wrote:

How do I code an event change macro that triggers when cell A2 is
changed.

Thanks


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
apply cell change event to single column - WorksheetChange Event [email protected] Excel Programming 6 May 4th 08 02:28 AM
Change event -- cell colors change Mr. Dan[_2_] Excel Programming 1 January 16th 07 09:45 AM
Cell value change to trigger macro (worksheet change event?) Neil Goldwasser Excel Programming 4 January 10th 06 01:55 PM
Cell change event gig Excel Programming 5 March 25th 05 02:54 PM
Change Cell from Validated List Not Firing Worksheet Change Event [email protected] Excel Programming 3 October 4th 04 03:00 AM


All times are GMT +1. The time now is 06:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"