+ Reply to Thread
Results 1 to 6 of 6

Adding a code in a macro to respond to a pop-up message

  1. #1
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Adding a code in a macro to respond to a pop-up message

    I've written a code that overwrites an existing file each time it runs. Is there anyway to write the code so that the attached pop up box gets answered "Yes" and the code keeps running?


    Capture.JPG

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Adding a code in a macro to respond to a pop-up message

    No tested.
    change the text to suit your need.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Adding a code in a macro to respond to a pop-up message

    Thank you but this didn't work as expected. When the macro runs and the "Do you want to replace it?" message box pops up on its own, I want the macro to automatically "reply" Yes and move on. So I guess the question is, is there coding that will answer Yes to any and all pop ups that happens during a macro's entire run through?

  4. #4
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Adding a code in a macro to respond to a pop-up message

    That is a standard Excel warning that you (or the code) is about to do something destructive. You can suppress those messages by adding a line of code before you do whatever ...
    Please Login or Register  to view this content.
    You should restore the setting to True immediately after saving the file and you should also look into adding error handling so that the setting is not left turned off if there should be any error saving the file.

  5. #5
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Adding a code in a macro to respond to a pop-up message

    Im going to go with the following coding which does what I need it to do

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor dagindi's Avatar
    Join Date
    06-02-2008
    Location
    New York, NY
    MS-Off Ver
    Excel 2007 & 2010
    Posts
    295

    Re: Adding a code in a macro to respond to a pop-up message

    I didnt see this before posting. Thank you!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding an error message to existing code
    By michelle 1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2015, 01:15 PM
  2. The code takes ages to respond. Why?
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-03-2014, 06:51 AM
  3. Macro to recognize message from website and respond with msgbox to user
    By Excel_Phil in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-09-2013, 05:13 PM
  4. Respond to Excel message box via macro
    By jgombola in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-26-2009, 06:09 PM
  5. [SOLVED] respond to message box
    By Avecina in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2006, 09:40 AM
  6. [SOLVED] Force event code to NOT respond
    By Peter Danes in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-07-2006, 10:20 AM
  7. [SOLVED] Automatically respond to message box appearing within a VBA macro
    By Daniel75 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-25-2005, 03:06 PM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1