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
 
Top