LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 111
Default save as csv cell format

Dave,
Yes, I did verify it in Notepad. I does change the dd/mm/yyyy to mm\dd\yyyy
it doesn't make any sense. I checked my 'global' settings on my computer and
they are set for dd/mm/yyyy.
If I save it 'manually' the file is ok.
But when I use the MACRO to save as csv then it changes the date around.
If you have any more suggestions, they are welcome.
Thanks for your time already spent.
Helmut

"Dave Peterson" wrote:

#1. Did you verify this by opening the .csv file in excel or in Notepad? When
I opened the file in Notepad, it looked ok.

#2.

Dim myCurFolder As String
Dim myNewFolder As String

myCurFolder = CurDir
myNewFolder = "c:\MESSER\MESSERmmyy""

ChDrive myNewFolder
ChDir myNewFolder

'do your save

'change back
ChDrive myCurFolder
ChDir myCurFolder

Helmut wrote:

Dave,
That's not it....
1 - I do a manual Save-As and select in the dialogue box the CSV and save
the file. \When opening it, the date in Column C is dd/mm/yyyy just as it was
in the xls file.
2 - I run the Macro Save-As CSV and the Column C in the CSV file becomes
mm/dd/yyyy
here is the macro I use:

fileSaveName = Application.GetSaveAsFilename("\\c:\MESSER\MESSERm myy",
fileFilter:="CSV Files (*.csv), *.csv")

'save the file

ActiveWorkbook.SaveAs Filename:= _
fileSaveName, FileFormat _
:=xlCSV, CreateBackup:=False

"Dave Peterson" wrote:

Don't verify your data in that CSV file by reopening it in Excel.

Open that CSV file in NotePad to check it out.

If you really want to reopen the CSV file in Excel, then rename it to .TXT and
then you can specify the format you need for that date field.

Helmut wrote:

I have WORKSHEET(1) with Column "C" formatted as dd/mm/yyyy
__with other values in other columns
I copy and paste_special 'values'
then
I 'saveas' the file in *CSV format and when I open the CSV file the date
format has changed to 'general' which is to be expected in CSV, but the value
has also changed to m/dd/yyyy

I need the format in the CSV file to be dd/mmm/yyyy
thanks

--

Dave Peterson


--

Dave Peterson



 
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
Save in a .prn format [email protected] Excel Discussion (Misc queries) 2 April 3rd 23 07:00 PM
How do I save a custom cell format that I created? mrs_teeks Excel Worksheet Functions 1 May 8th 06 03:55 AM
How can I format an Excel cell with a "save" or other command? FPB Excel Programming 0 August 17th 05 05:22 PM
Custom Cell Format Will Not Save Correctly szyzygy Excel Worksheet Functions 3 July 21st 05 11:55 PM
save button in excel to save one of the worksheets with a cell value as its name Colin[_9_] Excel Programming 2 September 21st 04 11:28 PM


All times are GMT +1. The time now is 02:54 AM.

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

About Us

"It's about Microsoft Excel"