Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 3 of 3

Thread: Closing a workbook during a macro without saving it

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

    Default

    I wish to close a workbook during a macro without saving it.
    Currently, the vba command 'ActiveWorkbook.Close' brings up the usual dialogue box asking if I wish to save or not and I am able to select No, but wish to automate this process.
    Due to the large amount of data, I also get a message if I want to save the data in the clipboard - again I wish to automate the No option.
    How can I do this?

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-18 01:49, Ajtoo wrote:
    I wish to close a workbook during a macro without saving it.
    Currently, the vba command 'ActiveWorkbook.Close' brings up the usual dialogue box asking if I wish to save or not and I am able to select No, but wish to automate this process.
    Due to the large amount of data, I also get a message if I want to save the data in the clipboard - again I wish to automate the No option.
    How can I do this?
    ActiveWorkbook.Close False


    For the clipboard...just clear it with
    Application.cutcopymode = false


    HTH

    Ivan

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

    Default

    Both excellent - many thanks
    Andrew

Some videos you may like

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
  •