Re: Save CSV File without prompting

From: Rob K (RobK_at_discussions.microsoft.com)
Date: 09/23/04


Date: Thu, 23 Sep 2004 08:21:04 -0700

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" <anonymous@discussions.microsoft.com> wrote in message
> news:00a801c4a171$51b4b430$3a01280a@phx.gbl...
> > 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-
>
>
>



Relevant Pages

  • RE: CSV Header Information
    ... I thought you said you want to write/create a csv file with your data in it, ... adding hour header at the top. ... Dim ColNdx As Integer ... "Tom Ogilvy" wrote: ...
    (microsoft.public.excel.programming)
  • Re: Range Resize property
    ... "jacqui" wrote in message ... > means we must have remedied the .CSV bit). ... >>Tom Ogilvy ... >>> at least you can see the full sub. ...
    (microsoft.public.excel.programming)
  • Re: Save CSV File without prompting
    ... Tom Ogilvy ... "Chris" wrote in message ... > When trying to save and close a CSV I get prompted ... > Save so I cant just send keystrokes to say Yes, Save, ...
    (microsoft.public.excel.programming)
  • Re: Macro that counts rows and averages data in row
    ... Regards, ... Tom Ogilvy ... > I have a Excel file that is imported in from another program as a CSV ...
    (microsoft.public.excel.programming)