troubleshooting Question

Prohibit saving of Workbook on Close

Avatar of Sandra Smith
Sandra SmithFlag for United States of America asked on
Microsoft ExcelMicrosoft ApplicationsMicrosoft Development
10 Comments1 Solution375 ViewsLast Modified:
I have a reporting workbook that users open and can view various PivotTables.  Everything is done in code.  But while the workboko is open, they can create their own pivot tables and analysis.  However, when the workbook is closed, I DO NOT want any changes they have made to ever be saved.  I have the procedure below, but where should it be called to prevent any saving?

Sandra

Sub CloseNoSave()
     'Close the workbook without saving it
    ThisWorkbook.Close savechanges:=False
End Sub
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 10 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 10 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros