Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ram Ram is offline
external usenet poster
 
Posts: 138
Default undo date format questions

I use the following code to change the cell contents back to the previous
value. When I change a cell with a date value the code places 1/1/1900 in
it's place, instead of the actual date. Can someone explain how I can have
the correct date valued entered.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

Dim OldValue As Variant
OldValue = Target(1).Formula
End Sub

Private Sub Worksheet_Change(ByVal Target As Range)
Dim OldValue As Variant
If Target(1).Formula < OldValue Then _
MsgBox "Used to be " & CStr(OldValue)
End Sub



Thanks for any help


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
Conditional Format - Due Dates - 2 questions Stacy Excel Discussion (Misc queries) 0 June 25th 08 08:03 PM
Date Format....more questions from a beginner Lindsey Excel Programming 1 November 26th 05 06:07 AM
Puzzling Format Questions Kevin H. Stecyk Excel Discussion (Misc queries) 3 May 17th 05 11:44 AM
Date Format Questions Mestrella31 Excel Discussion (Misc queries) 2 January 17th 05 08:36 PM
questions regarding chart format. Young-Hwan Choi Excel Programming 0 February 8th 04 04:59 AM


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