i have a workbook that imports data from a backup csv file.
i use the
to copy the whole sheet into my workbook.
numerouse columns contain date and times in the format dd/mm/yyyy hh:mm in the csv file the date format after copying is still dd/mm/yyyy hh:mm but the date has changed i.e 12/03/2009 22:45 is now 03/12/2009 22:45 but the formatting means it is the 3rd of december.
even worse 13/03/09 22:45 in the origional csv file reads 13/03/09 22:45 after copying but the format shows as text not numeric. i can not get the backup file format changed, can anyone help me to stop the format changing - when i do it manually the date does not switch it is only when the macro is used that the dates switch.
I am using 2003
i use the
Code:
sheets(sheetname).copy after = workbooks("my workbook.xls").sheets(2)
numerouse columns contain date and times in the format dd/mm/yyyy hh:mm in the csv file the date format after copying is still dd/mm/yyyy hh:mm but the date has changed i.e 12/03/2009 22:45 is now 03/12/2009 22:45 but the formatting means it is the 3rd of december.
even worse 13/03/09 22:45 in the origional csv file reads 13/03/09 22:45 after copying but the format shows as text not numeric. i can not get the backup file format changed, can anyone help me to stop the format changing - when i do it manually the date does not switch it is only when the macro is used that the dates switch.
I am using 2003