![]() |
forward compatibility excel 2002?
VBA and macros work fine in excel 2002 and previous versions. Problem
with date on excel 2003. No debug or errors being generated, but macro transferring an inputted date from sheet 1 to sheet 2 is bringing over an altogether different date to what has been inputted on sheet 1. Does anyone have an idea how this is happening. Is there some simple checkbox or setting I might be not be seeing in the 2003 version? I am totally baffled, and any suggestions would be great. Thanks in advance. Bev |
forward compatibility excel 2002?
It would help to see the code in question.
A date is a date is a date, problems like this tend to happen when dates get formatted and/or converted to strings and back. HTH. Best wishes Harald "Bevy" skrev i melding oups.com... VBA and macros work fine in excel 2002 and previous versions. Problem with date on excel 2003. No debug or errors being generated, but macro transferring an inputted date from sheet 1 to sheet 2 is bringing over an altogether different date to what has been inputted on sheet 1. Does anyone have an idea how this is happening. Is there some simple checkbox or setting I might be not be seeing in the 2003 version? I am totally baffled, and any suggestions would be great. Thanks in advance. Bev |
forward compatibility excel 2002?
Hi Harald,
Thanks for your reply. The code that does the moving of the date from sheet 1 to sheet 2 is below. I guess it could be a string thing! Sub Insert_Change_Data() Application.ScreenUpdating = False ' ' Shortcut = Ctrl z ' Gets date from Claim sheet inserts into workings ' Dim rng As Range Dim myDate As Date Const col As String = "C:C" With ThisWorkbook myDate = .Sheets("Claim").Range("C3").Value On Error Resume Next Set rng = .Sheets("Workings").Columns(col). _ SpecialCells(xlBlanks) On Error GoTo 0 End With If Not rng Is Nothing Then rng.Value = myDate End If Any feedback on alternative approach would be gratefully received. Many thanks, Bev Harald Staff wrote: It would help to see the code in question. A date is a date is a date, problems like this tend to happen when dates get formatted and/or converted to strings and back. HTH. Best wishes Harald "Bevy" skrev i melding oups.com... VBA and macros work fine in excel 2002 and previous versions. Problem with date on excel 2003. No debug or errors being generated, but macro transferring an inputted date from sheet 1 to sheet 2 is bringing over an altogether different date to what has been inputted on sheet 1. Does anyone have an idea how this is happening. Is there some simple checkbox or setting I might be not be seeing in the 2003 version? I am totally baffled, and any suggestions would be great. Thanks in advance. Bev |
forward compatibility excel 2002?
It sure looks like it worked ok for me.
What date do you have in claim!C3? What do you get in the empty cells in column C of Workings? Bevy wrote: Hi Harald, Thanks for your reply. The code that does the moving of the date from sheet 1 to sheet 2 is below. I guess it could be a string thing! Sub Insert_Change_Data() Application.ScreenUpdating = False ' ' Shortcut = Ctrl z ' Gets date from Claim sheet inserts into workings ' Dim rng As Range Dim myDate As Date Const col As String = "C:C" With ThisWorkbook myDate = .Sheets("Claim").Range("C3").Value On Error Resume Next Set rng = .Sheets("Workings").Columns(col). _ SpecialCells(xlBlanks) On Error GoTo 0 End With If Not rng Is Nothing Then rng.Value = myDate End If Any feedback on alternative approach would be gratefully received. Many thanks, Bev Harald Staff wrote: It would help to see the code in question. A date is a date is a date, problems like this tend to happen when dates get formatted and/or converted to strings and back. HTH. Best wishes Harald "Bevy" skrev i melding oups.com... VBA and macros work fine in excel 2002 and previous versions. Problem with date on excel 2003. No debug or errors being generated, but macro transferring an inputted date from sheet 1 to sheet 2 is bringing over an altogether different date to what has been inputted on sheet 1. Does anyone have an idea how this is happening. Is there some simple checkbox or setting I might be not be seeing in the 2003 version? I am totally baffled, and any suggestions would be great. Thanks in advance. Bev -- Dave Peterson |
All times are GMT +1. The time now is 08:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com