Loading
Ozgrid Excel Help & Best Practices Forums

Excel Video Tutorials / Excel Dashboards Reports



Results 1 to 4 of 4

Thread: Application.DisplayAlerts = False (not working!)

  1. #1
    Join Date
    20th February 2004
    Location
    Kansas City
    Posts
    146

    Application.DisplayAlerts = False (not working!)

    I am trying to get this code to work without getting that darn file already exist message. I read through the forum to get any other ideas other than the Application.DisplayAlerts = False, but I am lost...I don't know why the message still appears...anyone? Thanks for your help!


    VB:
     
    Sub saveWkbk() 
         '  Macro Recorded by Shawn Lollis
         
        Dim pathStr As String 
         
        pathStr = ThisWorkbook.Path 
        ActiveWorkbook.SaveAs Filename:=pathStr & "/MON2707.xls" 
        Application.DisplayAlerts = False 
        msg = "Monday Sales & Control Numbers are now updated." 
        msg = msg & Chr(13) & Chr(13) 
        msg = msg & "You are ready to e-mail file to Admin. Office." 
        msg = msg & Chr(13) & Chr(13) & Chr(13) 
        msg = msg & "Press OK to continue." 
        Title = "Confirmation of Monday Update" 
        Ans = MsgBox(msg, vbExclamation, Title) 
        ActiveWorkbook.Close 
        Application.Quit 
    End Sub 
    
    

    Excel Video Tutorials / Excel Dashboards Reports


  2. #2
    Join Date
    14th July 2004
    Posts
    10,539

    Re: Application.DisplayAlerts = False (not working!)

    Shouldn't you have the code to turn of alerts before the code to save the workbook?

    Excel Video Tutorials / Excel Dashboards Reports


  3. #3
    Join Date
    22nd April 2003
    Location
    Virginia, USA
    Posts
    5,035

    Re: Application.DisplayAlerts = False (not working!)

    I believe norie is right on target.

    Also, make sure you turn the alerts back on before you leave the macro (probably should do it as soon as you've finished with the area where you want alerts surpressed. Otherwise Excel will leave them turned off even after the macro has finished.

    Application.DisplayAlerts = True
    Best Regards,
    Tom
    ---------------------------
    Please help Oz share knowledge among all users by posting your questions in a public forum rather than using a Private Message.

  4. #4
    Join Date
    20th February 2004
    Location
    Kansas City
    Posts
    146

    Re: Application.DisplayAlerts = False (not working!)

    lol...omg...I knew it had to be something simple, but that was it! Thanks a bunch!

    Shawn

    Excel Video Tutorials / Excel Dashboards Reports


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Possible Answers

  1. Replies: 4
    Last Post: July 18th, 2006, 16:01
  2. Application.DisplayAlerts freezes application
    By Paul20091968 in forum EXCEL HELP
    Replies: 6
    Last Post: July 14th, 2006, 20:56
  3. Application.display alerrts and visible=false
    By JJacob in forum Excel and/or Word Help
    Replies: 2
    Last Post: March 7th, 2006, 20:13
  4. Application.DisplayAlerts
    By torero in forum EXCEL HELP
    Replies: 4
    Last Post: August 20th, 2004, 05:40

Bookmarks

Posting Permissions

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