mikeinvirginia
New Member
- Joined
- Nov 18, 2021
- Messages
- 3
- Office Version
- 2021
- Platform
- Windows
Hi all,
I love this site. I have seen questions on how to close a workbook with no save prompt. I have a tried the below set of macros. I still receive the prompt. I included all my macros. Maybe another macro is interfering. The first two macros work as intended. Clear range. The next set, I would like to disable the prompt to save the workbook. I still receive the prompt to save. I placed the macros in this workbook.
I love this site. I have seen questions on how to close a workbook with no save prompt. I have a tried the below set of macros. I still receive the prompt. I included all my macros. Maybe another macro is interfering. The first two macros work as intended. Clear range. The next set, I would like to disable the prompt to save the workbook. I still receive the prompt to save. I placed the macros in this workbook.
VBA Code:
Private Sub Workbook_Open()
Application.EnableEvents = False
Worksheets("Calculator").Range("C4:C5").Value = ""
Application.EnableEvents = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Worksheets("Calculator").Range("C4:C5").Value = ""
End Sub
Private Sub Auto_Close()
ThisWorkbook.Saved = True
Private End Sub
Private Sub CloseBook()
Application.DisplayAlerts = False
ThisWorkbook.Close
Application.DisplayAlerts = True
Private End Sub
Private Sub CloseBook2()
ThisWorkbook.Close savechanges:=False
End Sub