Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Date Format problem

Hi,

I am using a macro to open a csv file, make some changes then save it.
I'm using

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows
ActiveWorkbook.Close SaveChanges:=True

to save the file.

The problem is, some of the data (which I'm not changing) is dates, eg
15/02/2005
this appears in the saved file as 2/15/2005.
I've checked my International settings and they're all UK so I don't know
what's wrong.
I've tried different file formats.
I just want the date to remain unchanged.

Thanks in advance for your help.

Regards
SW


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Date Format problem

Under 'Customise Regional Options' is the short date format actually set to
dd/MM/yyyy ?
Peter Bircher

"SW" wrote in message
...
Hi,

I am using a macro to open a csv file, make some changes then save it.
I'm using

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows
ActiveWorkbook.Close SaveChanges:=True

to save the file.

The problem is, some of the data (which I'm not changing) is dates, eg
15/02/2005
this appears in the saved file as 2/15/2005.
I've checked my International settings and they're all UK so I don't know
what's wrong.
I've tried different file formats.
I just want the date to remain unchanged.

Thanks in advance for your help.

Regards
SW




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Date Format problem

Yes, it is.
That's what baffles me.

"Pete" wrote in message
...
Under 'Customise Regional Options' is the short date format actually set

to
dd/MM/yyyy ?
Peter Bircher

"SW" wrote in message
...
Hi,

I am using a macro to open a csv file, make some changes then save it.
I'm using

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows
ActiveWorkbook.Close SaveChanges:=True

to save the file.

The problem is, some of the data (which I'm not changing) is dates, eg
15/02/2005
this appears in the saved file as 2/15/2005.
I've checked my International settings and they're all UK so I don't

know
what's wrong.
I've tried different file formats.
I just want the date to remain unchanged.

Thanks in advance for your help.

Regards
SW






  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Date Format problem

I cured this by putting a line in the code to format the date on each row
into the format I wanted. (It was already in that format to start with, but
hey! it works.)
SW
"Pete" wrote in message
...
Under 'Customise Regional Options' is the short date format actually set

to
dd/MM/yyyy ?
Peter Bircher

"SW" wrote in message
...
Hi,

I am using a macro to open a csv file, make some changes then save it.
I'm using

ActiveWorkbook.SaveAs FileFormat:=xlCSVWindows
ActiveWorkbook.Close SaveChanges:=True

to save the file.

The problem is, some of the data (which I'm not changing) is dates, eg
15/02/2005
this appears in the saved file as 2/15/2005.
I've checked my International settings and they're all UK so I don't

know
what's wrong.
I've tried different file formats.
I just want the date to remain unchanged.

Thanks in advance for your help.

Regards
SW






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
Excel Format Problem - Date Overrides Format Mary Excel Discussion (Misc queries) 5 February 10th 10 05:49 AM
Date Format Problem Suzanne Excel Discussion (Misc queries) 2 February 20th 08 03:05 PM
Date Format Problem Gayla Excel Discussion (Misc queries) 3 April 18th 07 07:48 PM
Date Format Problem Mario Excel Programming 5 February 9th 05 03:35 PM
Date format problem Terence Excel Programming 1 August 12th 03 07:45 AM


All times are GMT +1. The time now is 10:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"