Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
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
Backwards Compatibility with Excel 2002 elfregono Excel Discussion (Misc queries) 2 September 1st 08 10:29 PM
Compatibility Excel 2002 and 2000 in automation Michael[_38_] Excel Programming 2 April 12th 05 10:34 AM
Backward and Forward Compatibility Cathy in Florida Excel Discussion (Misc queries) 3 March 1st 05 03:10 PM
VBA Compatibility Between Excel 2000 and 2002 Winshent Excel Programming 8 October 13th 04 01:41 PM
compatibility between excel 2002 and 2003 Douvid Excel Programming 1 January 27th 04 02:33 PM


All times are GMT +1. The time now is 05:40 PM.

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"