+ Reply to Thread
Results 1 to 3 of 3

Stop "save changes" message appearing

  1. #1
    Registered User
    Join Date
    11-10-2004
    Posts
    23

    Stop "save changes" message appearing

    During a macro, I close a workbook, but get the "do you want to save changes" message appearing, even though I only opened said workbook purely to copy some cells to another workbook. I didn't make any changes!

    It is crucial that the macro does not halt so that the "save changes" message appears, so how do I stop it happening???

    Thanks!

  2. #2
    Chip Pearson
    Guest

    Re: Stop "save changes" message appearing

    Some functions like NOW will cause the workbook to calculate on
    opening, and thus your workbook will be changed. To close the
    workbook without saving changes, use


    Workbooks("Whatever.xls").Close savechanges:=False


    --
    Cordially,
    Chip Pearson
    Microsoft MVP - Excel
    Pearson Software Consulting, LLC
    www.cpearson.com





    "DJ Dusty"
    <[email protected]> wrote in
    message
    news:[email protected]...
    >
    > During a macro, I close a workbook, but get the "do you want to
    > save
    > changes" message appearing, even though I only opened said
    > workbook
    > purely to copy some cells to another workbook. I didn't -make-
    > any
    > changes!
    >
    > It is crucial that the macro does not halt so that the "save
    > changes"
    > message appears, so how do I stop it happening???
    >
    > Thanks!
    >
    >
    > --
    > DJ Dusty
    > ------------------------------------------------------------------------
    > DJ Dusty's Profile:
    > http://www.excelforum.com/member.php...o&userid=16335
    > View this thread:
    > http://www.excelforum.com/showthread...hreadid=520084
    >




  3. #3
    Registered User
    Join Date
    11-10-2004
    Posts
    23
    Fantastic, that's solved it - you're a legend!

+ 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