Results 1 to 3 of 3

Saving txt files without questions

This is a discussion on Saving txt files without questions within the Excel Questions forums, part of the Question Forums category; When I use the next commandline to save a sheet as a txt file: ActiveWorkbook.SaveAs Filename:= "C:Program FilesNew-WayMMSBDR004IMPORTCORKOP.txt", FileFormat:=xlText, CreateBackup:=False ...

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    15

    Default

    When I use the next commandline to save a sheet as a txt file:

    ActiveWorkbook.SaveAs Filename:= "C:Program FilesNew-WayMMSBDR004IMPORTCORKOP.txt", FileFormat:=xlText, CreateBackup:=False

    Then I get the question from Excel if the existing file must be overwritten.
    I want it ALL automated. How can I get rid of this question?

  2. #2
    MrExcel MVP
    Moderator
    Andrew Poulsom's Avatar
    Join Date
    Jul 2002
    Posts
    64,608

    Default

    Put:

    Application.DisplayAlerts = False

    before your SaveAs line, and

    Application.DisplayAlerts = True

    after it.

  3. #3
    New Member
    Join Date
    Mar 2002
    Posts
    15

    Default

    Thanks!! That does the trick.

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


DMCA.com