Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Conditional Format - Due Dates - 2 questions | Excel Discussion (Misc queries) | |||
Date Format....more questions from a beginner | Excel Programming | |||
Puzzling Format Questions | Excel Discussion (Misc queries) | |||
Date Format Questions | Excel Discussion (Misc queries) | |||
questions regarding chart format. | Excel Programming |