View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
[email protected] paul.robinson@it-tallaght.ie is offline
external usenet poster
 
Posts: 789
Default Workbook_SheetChange event

Hi
You could capture the cell value when the user selects the cell

Public FromValue As Variant

Private Sub Workbook_SheetSelectionChange(ByVal Sh As Object, ByVal
Target As Range)
FromValue = Target.Value
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As
Range)
Debug.Print Target.Value
Debug.Print FromValue
End Sub

regards
Paul

On Mar 13, 12:53*am, "PO" <h wrote:
Excel 2003, Sp2

Hi

I want to track changes in cells made by the user in the workbook. I use the
Workbook_SheetChange event.
The example below prints the value the user changed TO. Howerver, sometimes
I want to print the value the user changed FROM.

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
* * Debug.Print Target.Value
End Sub

How can I find out the value the user changed FROM?

Regards
Pete