+ Reply to Thread
Results 1 to 4 of 4

Answer Excel 'yes/no' question in Macro without user intervention?

  1. #1
    Registered User
    Join Date
    07-30-2007
    Posts
    4

    Question Answer Excel 'yes/no' question in Macro without user intervention?

    As part of my macro, I am opening a new workbook, copying data to it, and closing it after I'm done. I do not want to save the changes made to 'Book1'. How do I get the macro to answer this for me or ignore the question? I don't want the program to stop for input from the user.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Dingman4,

    To prevent the Save Changes dialog from launching, set the Workbook Saved property to true before you close the workbook.
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    07-30-2007
    Posts
    4

    Thank you! How do I answer 'no' to following question?

    What is the code to answer 'no' to the following question when closing excel file?

    "There is a large amount of information on the clipboard. Do you want to be able to paste this information into another program later?"

  4. #4
    Forum Expert
    Join Date
    09-09-2005
    Location
    England
    MS-Off Ver
    2007
    Posts
    1,500
    well you can
    activeworkbook.close false not to save changes

    application.displayalerts = false suppresses warnings like the clipboard thing

    Regards

    Dav

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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