LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
kk kk is offline
external usenet poster
 
Posts: 5
Default VB reformats dates when opening .CSV in excel

I've had a look thru old posts, i think this one has come up before
but no-one seems to have a simple answer; I was upgraded (?)
yesterday from office 97 to 2000, including excel and vb, now xl2000
and vb6. i have a simple macro which opens a .CSV file (which comes
from a unix box via ftp), and saves it as .XLS one column is dates.
under XL97 no problem. Under XL2000, if i do it manually
(openfile/saveas .csv) no problem. If i do it under a VB6 macro,
either old one, or new one recorded today from xl2000, then when the
csv is opened it shows dates reversed; eg using a text editor the
date from unix box in the .csv is 05/08 (yesterday). using manual
opening of .csv, it's 05/08, serial number is 37839 (if i reformat it
as a number). Using macro to open it, it shows 08/05 (which my
machine reads as 8th may), serial number is 37780.
is there a simple way to set the date format used in the vba
process to be NOT US-centric? obviously this needs to be able to be
done before the file is opened, as once it's opened the serial number
is changed. thanks kkk
 
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
Date problem when opening a csv without dates Mila Excel Discussion (Misc queries) 8 June 19th 08 04:37 PM
Macro that reformats data in excel spreadsheet L Hill Excel Worksheet Functions 1 September 24th 07 10:39 AM
Excel Mobile reformats Time entries Imposter Excel Discussion (Misc queries) 1 June 20th 06 10:20 AM
How do I get the dates on an excel chart to stay as dates instead. Rani Charts and Charting in Excel 1 September 20th 05 05:56 PM
REF errors when opening excel in xp. works fine when opening wor. br Excel Discussion (Misc queries) 6 September 13th 05 11:41 AM


All times are GMT +1. The time now is 06:01 AM.

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"