Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
PO PO is offline
external usenet poster
 
Posts: 66
Default Workbook_SheetChange event

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
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


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
Workbook_SheetChange masterphilch Excel Programming 5 January 19th 06 08:35 PM
reset Workbook_SheetChange event? Lore Leuneog Excel Programming 1 March 16th 05 08:24 PM
Workbook_sheetChange event J S Excel Programming 0 August 9th 04 07:16 PM
workbook_sheetchange JulieD Excel Programming 1 June 14th 04 04:32 AM
Problem with the Workbook_SheetChange event??? angel Excel Programming 0 January 29th 04 02:56 PM


All times are GMT +1. The time now is 03:08 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"