View Single Post
  #1   Report Post  
Magius00
 
Posts: n/a
Default days and months swapping when copying using VB

When running the code:

Set rTable = refCell.CurrentRegion
Set NewSheet = Workbooks("ehealthgen1").Worksheets.Add
rTable.Copy
NewSheet.Range("a1").PasteSpecial (xlPasteValues)

Excel 2003 swaps the days and months for half of the work area and just
imports the rest of the dates as text. The source is a CSV file and the first
column is dates. This code works fine in office 97 but not 2003. I have just
noticed similar problems with other code where copying from one worksheet to
another or workbook. I have check my language formats even gave checking the
1904 date format box a go but nothing i have tried is to any benifit. Any
help on this matter would be appriciated.