Code for "Do Not Save" Book1 in visualbasic macro

M

mike

I have a macro that copies the contents of Book1 into
another file then closes Book1. I don't want to save it
but I keep being asked if I want to. How do stop this
via code? I know it's easy if you know already, but I
don't. Thanks Mike
 
R

Ron de Bruin

If the code is in Book1 then you can use this
to close the file without saving

ThisWorkbook.Close False
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top