Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Many thanks Bob
"Bob Phillips" wrote: Option Explicit Private oldCell Const kTarget As String = "H10" Private Sub Worksheet_Activate() oldCell = ActiveCell.Value End Sub Private Sub Worksheet_Change(ByVal Target As Range) On Error GoTo ws_exit: Application.EnableEvents = False If Target.Address(False, False) = kTarget Then MsgBox "Was " & oldCell & ", and is now " & Target.Value oldCell = Target.Value End If ws_exit: Application.EnableEvents = True End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Address(False, False) = kTarget Then oldCell = Target.Value End If End Sub 'This is worksheet event code, which means that it needs to be 'placed in the appropriate worksheet code module, not a standard 'code module. To do this, right-click on the sheet tab, select 'the View Code option from the menu, and paste the code in. -- HTH RP (remove nothere from the email address if mailing direct) "Willow" wrote in message ... Using the event Worksheet_Change, is that possible to compare the data in cell before the change with the one which fire the macro ? I'm running under Excel 97 ! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Microsoft Responds to the Evolution of Online Communities | Excel Discussion (Misc queries) | |||
Microsoft Responds to the Evolution of Online Communities | Excel Worksheet Functions | |||
Update - Microsoft Responds to the Evolution of Community | Excel Discussion (Misc queries) | |||
Update - Microsoft Responds to the Evolution of Community | New Users to Excel | |||
Microsoft Responds to the Evolution of Online Communities | New Users to Excel |