Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Fib Fib is offline
external usenet poster
 
Posts: 6
Default Saveas csv file

I need to save a xls file as csv.
When I save it manualy by using saveas, and choosing csv format in the drop
down box, everything is OK.
But when I try to program it in VB, all the data is put in column A.

Can anybody help?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Saveas csv file

Hi,

did you try macro recorder?

Regards,
Ivan

  #3   Report Post  
Posted to microsoft.public.excel.programming
Fib Fib is offline
external usenet poster
 
Posts: 6
Default Saveas csv file

Hi

Yes. When i juse the recorder, all the data is arrangende in column A
Regards Fib

"Ivan Raiminius" skrev:

Hi,

did you try macro recorder?

Regards,
Ivan


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Saveas csv file

Hi,

so, you are using:

workbooks("some workbook").SaveAs Filename:= _
"some filename(including path).csv" _
, FileFormat:=xlCSV, CreateBackup:=False

in your code?

Regards,
Ivan

  #5   Report Post  
Posted to microsoft.public.excel.programming
Fib Fib is offline
external usenet poster
 
Posts: 6
Default Saveas csv file

Hi
My code is:
Windows("record.xls").Activate
ActiveWorkbook.SaveAs "F:\record.csv", FileFormat:=xlcsv

I have tryed this one as well, but havent been able to create the same
format, like the format when I am saving it manualy.

Windows("record.xls").Activate
Const xlcsv = 1 '(I have tryed every number from 1 to 100. )
ActiveWorkbook.SaveAs "F:\record.csv", FileFormat:=xlcsv

Best regards Fib

"Ivan Raiminius" skrev:

Hi,

so, you are using:

workbooks("some workbook").SaveAs Filename:= _
"some filename(including path).csv" _
, FileFormat:=xlCSV, CreateBackup:=False

in your code?

Regards,
Ivan




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 258
Default Saveas csv file

Hi,

xlcsv = 6

your code should work. What is the exact problem? What do you see when
you open your .csv file in Notepad? and in Excel?

Regards,
Ivan

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
Confused here Prevent Saving File - but allow ONLY File SAVEAS Met JMay Excel Discussion (Misc queries) 2 June 17th 07 04:37 PM
saveas CSV file stevekirk Excel Discussion (Misc queries) 0 August 10th 06 01:11 PM
File SaveAs FinChase Excel Programming 1 March 7th 06 01:41 AM
Saveas with name of another file sowetoddid[_19_] Excel Programming 15 June 11th 04 04:53 PM
SaveAs another file name, then keep working L Mehl Excel Programming 2 February 24th 04 02:11 AM


All times are GMT +1. The time now is 06:52 PM.

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"