Excel Macro Close Workbook Without Saving. I have an Excel workbook with a custom non-time-dependent cell function that I am opening from a C# WindowsForms application using Interop. When I try to directly close (without saving), I get a save prompt.
Excel should close without and prompts to ask you if you would like to save the workbook.
How to access information in a workbook with a macro that is part of a While the macro recorder always selects something before acting upon it, this is not necessary when you are writing VBA code without the macro recorder..is to close the workbook and save any changes that have been made to it (you could also choose to not save changes to prevent half-finished data from times out and closes, if there is another excel file (without this code) also open, then for some reason automatically my original workbook with the.
I am trying to create a macro for a Button to: exit a worksheet, without saving (it is a Read-only template file), and close Excel. the end users are not comfortable with PC use, so the fewer choices left to them the better. We can equally close our current workbook without saving it by using the macro code below. When you automate Excel functions with macros using Visual Basic for Applications, Excel doesn't know a macro is controlling execution and continues to issue Set the workbook property to "Saved" as though you have just saved the file and then close the workbook to discard changes without any.








