Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Save CSV File without prompting

When trying to save and close a CSV I get prompted
with...Do you want to save changes to file.csv, then after
choosing Yes I still get the SaveAs dialog box and have to
choose Save, and then again am told that now it already
exists, do I want to replace?

User ends up having to respond to 3 pop-ups from Excel.
Is there a way to have these default to Yes/Save? Here is
my simple close code..

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

I have tried SendKeys but I dont think the VBA gets to
that line of code because it is not yet finished with the
Save so I cant just send keystrokes to say Yes, Save,
Yes. Any help would be greatly appreciated.

c-
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Save CSV File without prompting

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

Activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
When trying to save and close a CSV I get prompted
with...Do you want to save changes to file.csv, then after
choosing Yes I still get the SaveAs dialog box and have to
choose Save, and then again am told that now it already
exists, do I want to replace?

User ends up having to respond to 3 pop-ups from Excel.
Is there a way to have these default to Yes/Save? Here is
my simple close code..

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

I have tried SendKeys but I dont think the VBA gets to
that line of code because it is not yet finished with the
Save so I cant just send keystrokes to say Yes, Save,
Yes. Any help would be greatly appreciated.

c-



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Save CSV File without prompting

Is there something analagous available for closing a file (in this case a csv
file) to avoid the discard/save message that pops up alerting the user that
there's a large amounts of data in the clipboard?

I would like to be able to close my csv file after copying the data from it
and automatically discard the data saved in the office clipboard.

Thanks in advance!
Rob

"Tom Ogilvy" wrote:

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

Activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
When trying to save and close a CSV I get prompted
with...Do you want to save changes to file.csv, then after
choosing Yes I still get the SaveAs dialog box and have to
choose Save, and then again am told that now it already
exists, do I want to replace?

User ends up having to respond to 3 pop-ups from Excel.
Is there a way to have these default to Yes/Save? Here is
my simple close code..

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

I have tried SendKeys but I dont think the VBA gets to
that line of code because it is not yet finished with the
Save so I cant just send keystrokes to say Yes, Save,
Yes. Any help would be greatly appreciated.

c-




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Save CSV File without prompting

I found my answer I found a thread from Ron Bovey. I used the
Application.CutCopyMode=False and that did the trick.

"Rob K" wrote:

Is there something analagous available for closing a file (in this case a csv
file) to avoid the discard/save message that pops up alerting the user that
there's a large amounts of data in the clipboard?

I would like to be able to close my csv file after copying the data from it
and automatically discard the data saved in the office clipboard.

Thanks in advance!
Rob

"Tom Ogilvy" wrote:

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

Activeworkbook.Close SaveChanges:=False

--
Regards,
Tom Ogilvy


"Chris" wrote in message
...
When trying to save and close a CSV I get prompted
with...Do you want to save changes to file.csv, then after
choosing Yes I still get the SaveAs dialog box and have to
choose Save, and then again am told that now it already
exists, do I want to replace?

User ends up having to respond to 3 pop-ups from Excel.
Is there a way to have these default to Yes/Save? Here is
my simple close code..

ActiveWorkbook.SaveAs Filename:="L:\#FACRR1
\VendorReleaseDetailForImport.csv", _
FileFormat:=xlCSV, CreateBackup:=False

I have tried SendKeys but I dont think the VBA gets to
that line of code because it is not yet finished with the
Save so I cant just send keystrokes to say Yes, Save,
Yes. Any help would be greatly appreciated.

c-




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
Stop prompting for save the changes in Excel dhardman Excel Discussion (Misc queries) 0 November 28th 07 05:11 PM
File closes without prompting to save freyabeads Excel Discussion (Misc queries) 0 March 1st 06 01:00 PM
calculation - prompting to save when file closes lpj Excel Discussion (Misc queries) 0 February 14th 06 08:27 PM
Save file without prompting andym Excel Programming 1 February 20th 04 02:11 PM
Excel not prompting to save Add-ins R Avery Excel Programming 1 January 29th 04 06:42 PM


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