Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating and closing CSV file

I have a macro that opens a new workbook, copies a range and pastes i
into the new workbook, and then closes the new workbook as a CS
format. Everything works fine except that a window opens that asks i
I want to save changes to the CSV file. Clicking "Yes" in this bo
causes the macro to complete and the file is saved as desired. I
there a way to keep this "Save Changes in file xxxxx.csv" box fro
opening?
Thank

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Creating and closing CSV file

Hello David

The following works for me

Sub SvCsvFile(
Dim nwBook As Workboo
Set nwBook = Workbooks.Ad
With Applicatio
.ScreenUpdating = Fals
'Only to kill overwrite dialo
.DisplayAlerts = Fals
End Wit
ThisWorkbook.Sheets(1).Range("a1:b20").Copy
nwBook.Sheets(1).Range("a1"
nwBook.Close True, "c:\temp\test.csv
With Applicatio
.ScreenUpdating = Tru
.DisplayAlerts = Tru
End Wit
Set nwBook = Nothin
End Su

Regards
Nate Oliver
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Creating and closing CSV file

Nate,

Thanks for the help. The following solved the issue:

With Application
.DisplayAlerts = False
End With

I appreciate your input,
Davi

--
Message posted from http://www.ExcelForum.com

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
How to skip the save file notoification on file closing? Dan Excel Worksheet Functions 1 August 19th 07 02:26 PM
File Says Read Only Even After Closing It Dileep Chandran Excel Discussion (Misc queries) 3 October 31st 06 07:01 PM
closing 1 file at a time Keith G Hicks Excel Discussion (Misc queries) 4 September 4th 05 02:16 AM
closing a file without saving matt dunbar Excel Programming 3 November 25th 03 06:29 PM
VBA closing one file colic Excel Programming 2 September 25th 03 05:16 PM


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