Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Change Cell Event
How do I code an event change macro that triggers when cell A2 is
changed. Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
apply cell change event to single column - WorksheetChange Event | Excel Programming | |||
Change event -- cell colors change | Excel Programming | |||
Cell value change to trigger macro (worksheet change event?) | Excel Programming | |||
Cell change event | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |