View Single Post
  #3   Report Post  
Magius00
 
Posts: n/a
Default

Unfortuntly this was my first port of call. The settings do match up i even
recreated the csv on the laptop desipte it contains no formatting. Worse
thing is if i copy it manualy it copys it with no problems. Only if i use any
macro code does it seam to not work. This of ocurse became even more puzzling
when i saw halfway down the sheet that excel had imported the rest of the
records as text insteadof as a date and i can't apply formatting to this.

"Ron Rosenfeld" wrote:

On Mon, 25 Apr 2005 02:55:02 -0700, "Magius00"
wrote:

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.


If your regional settings (Start/Control Panel/...) are not the same as the
imported data, you may see this type of behavior. If that is the case, perhaps
you could paste the data in as TEXT, and then do the Data/Text to Columns
function to convert it properly to your dates.


--ron