LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 182
Default Problems using Worksheet_Change

Peres,

This will help you:
Option Explicit
Private Old_data
Private New_data
'

Private Sub Worksheet_Change(ByVal Target As Range)
New_data = Target.Value
MsgBox "Change from '" & Old_data & "' to '" & New_data & "'"
End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Old_data = Target.Value
End Sub

--
Regards,

Halim



"Gary''s Student" wrote:

You will need to "remember" the old value by storing it in a static variable.
--
Gary''s Student - gsnu200737


"Peres from Brasil" wrote:

Does someone knows if exist any way of getting the old value in this:

Private Sub Worksheet_Change(ByVal Target As Range)
€˜ for the new data coming is easy:
New_data = Target.Value

€˜And about the old data into the cell€¦. Is there something like:

Old_data = Target.Old_data
End Sub

Thanks a lot
Peres

 
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
problems with Worksheet_Change function when drop-down lists Embirath Excel Programming 12 October 12th 06 04:39 PM
Problems with "Worksheet_Change" konpego Excel Discussion (Misc queries) 0 July 5th 05 06:29 AM
worksheet_change problems pauluk[_6_] Excel Programming 1 February 27th 04 02:49 PM
worksheet_change vs. calculate, and worksheet_change not running Tom Ogilvy Excel Programming 1 July 14th 03 02:51 AM


All times are GMT +1. The time now is 09:36 AM.

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

About Us

"It's about Microsoft Excel"