Klartigue
06-08-2012, 01:32 PM
I close a worbook with this code:
Sub CloseSheet()
Windows("Avalon Balanced Accounts.xls").Activate
ActiveWindow.Close
End Sub
After copying data on a workbook and pasting it into a new sheet, I want to close the original worbook in which i copied data from.
After I run this code to close the original workbook, I get two messages about closing the book. The first one asks if i want to save changes, and I want to say "No.". The second message pops up after that and says there is a large amount of information copied, and do I want to save it to the clipboard. I also want to say "No" here. How do I incorporate that into my code to say no to both messages?
Sub CloseSheet()
Windows("Avalon Balanced Accounts.xls").Activate
ActiveWindow.Close
End Sub
After copying data on a workbook and pasting it into a new sheet, I want to close the original worbook in which i copied data from.
After I run this code to close the original workbook, I get two messages about closing the book. The first one asks if i want to save changes, and I want to say "No.". The second message pops up after that and says there is a large amount of information copied, and do I want to save it to the clipboard. I also want to say "No" here. How do I incorporate that into my code to say no to both messages?