Suppressing the save as message box
Manage your personal finances in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: Suppressing the save as message box

  1. #1
    New Member
    Join Date
    Mar 2002
    Posts
    1
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi:

    I am using an Excel object to save data from a VB Application. The application has to be run unattended coz it collects the data from the database and save it to Excel file every midnight. The problem is it gives a message box "A file names xyz.xls already exists in this location. Do you want to replace it?"
    which i do not want coz it is supposed to be unattended. Following line of code I am using

    oSheet.Saveas "xyz.xls"

    Is there a way out ??? thanks in advace...

  2. #2
    MrExcel MVP Mark O'Brien's Avatar
    Join Date
    Feb 2002
    Location
    Columbus, OH, USA
    Posts
    3,530
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    This should work.



    Application.DisplayAlerts = False
    oSheet.SaveAs "xyz.xls"
    Application.DisplayAlerts = True




User Tag List

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