1
votes

I have a macro enabled excel file that I use as a master workbook. All this does is open up a form on workbook load and allows me to choose some options on the form to manipulate a second workbook. All works fine - I can choose the second workbook, do some actions on it, save it from code behind and close it. When I am all done I want to close the master workbook but it prompts me to save "master.xlsm". I do not want it to prompt for this as my users should never save into the master book. I can only assume excel thinks there were changes because I used the form housed within.

How can I disable the save warning or dispose of the form so excel won't prompt?

1
Have you tried book.close false?findwindow
you may also need Application.DisplayAlerts = False Dirk Reichel
@BruceWayne yes... for as good as all application.-stuff... as long as there no fatal errors (but as said, manual reset will also not happen)... but keep in mind that Application.Calculate is a normal setting and wont go back to automaticDirk Reichel
@VinnyGuitara Workbooks.Open("Book.xls", ReadOnly:=True)John Alexiou
@BruceWayne i don't want to spam but: you can do a quickcheck with the direct window -> input something like Application.ScreenUpdating = False and then put a ? in front of it (?Application.ScreenUpdating = False). if the output is False then that setting has an auto-resetDirk Reichel

1 Answers

0
votes

Set <Workbook Object>.Saved = True before closing it