JohnZ1156
Board Regular
- Joined
- Apr 10, 2021
- Messages
- 180
- Office Version
- 2021
- Platform
- Windows
I have a macro to print out a page. Then I have this at the very end of my macro.
But after I get the message box that the Workbook has been saved, and I press "OK". when I go to close the workbook by clicking on the red "X" in the top right hand corner, it asks me if I want to save the Workbook. Why?
But after I get the message box that the Workbook has been saved, and I press "OK". when I go to close the workbook by clicking on the red "X" in the top right hand corner, it asks me if I want to save the Workbook. Why?
VBA Code:
MsgBox ("The " & Left(ActiveWorkbook.Name, Len(ActiveWorkbook.Name) - 5) & " Workbook was saved!")
ThisWorkbook.Save
End Sub