View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default opening worksheet

In xl2003+ (maybe xl2002???), there's a "local:=true" parm that you can pass to
the workbooks.open line. It'll use the regional settings (under control panel)
for the date format.

If you don't have that parm in your version of excel, then maybe you could
rename the file from *.csv to *.txt. Then you can specify what each field
should be--including the date order (mdy or dmy or...).



RobcPettit wrote:

Hi, I have a worksheet that contains a column of dates. If I double
click to open, or use File-Open etc, the dates format ok. I want to
open using vba, so I recorded a macro, but when I run the macro, some
dates format ok, august dates, others format as usa, september dates.
then code I used is Workbooks.Open Filename:= _
"C:\Documents and Settings\Robert\Desktop\FOOTBALL\Soccer
Predictions\E0.csv". Any ideas please.
Regards Robert


--

Dave Peterson