Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Problem in exporting to csv


hi all


I wanted to export a workbook (it has only one worksheet) to a csv file,
so I used this code:


ActiveWorkbook.SaveAs Filename:= "c:\aFile.csv", FileFormat:=xlCSV
,CreateBackup:=False

It works fine, but after I run it i find myself working in Excel within
the aFile.csv file instead of the initial aFile.xls.

How can I export to the csv while remaining inside the xls after the export?

Thanks!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 471
Default Problem in exporting to csv

After exporting,

ActiveWorkbook.SaveAs FileName:=X, _
FileFormat:=xlCSV, CreateBackup:=False
ActiveWindow.Close , savechanges:=False

Then you would be where you were before you added this workbook. But if you
must go someplace else, you could explicitly return somewhere else:

Windows("FirstFile.xls").Activate


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
exporting to excel problem Medes Excel Programming 0 October 8th 06 10:40 PM
exporting to excel problem Medes Excel Programming 0 October 8th 06 10:40 PM
Problem exporting as csv file Felicity Geronimo Excel Programming 2 December 8th 04 03:39 PM
Exporting To Excel With ASP - Number Problem williamsd Excel Programming 8 March 6th 04 06:10 PM
Exporting to Excel using ASP Problem jtk7622 Excel Programming 0 November 17th 03 06:20 PM


All times are GMT +1. The time now is 04:42 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"