Hallo allemaal,
Ik heb onderstaande code om een aantal instellingen in Excel weer terug te zetten.
Als het bestand al is opgeslagen en ik wil het sluiten, vraagt Excel toch weer of het bestand opgeslagen moet worden.
Is dat te voorkomen?
Groet,
Willem
Ik heb onderstaande code om een aantal instellingen in Excel weer terug te zetten.
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.EnableEvents = True
Application.ScreenUpdating = True
Application.MoveAfterReturnDirection = xlDown
ActiveWindow.DisplayHeadings = True
Application.DisplayFormulaBar = True
End Sub
Als het bestand al is opgeslagen en ik wil het sluiten, vraagt Excel toch weer of het bestand opgeslagen moet worden.
Is dat te voorkomen?
Groet,
Willem