ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pop up reminder when closing Excel (https://www.excelbanter.com/excel-programming/413439-pop-up-reminder-when-closing-excel.html)

Gareth Wretham

Pop up reminder when closing Excel
 
I want to create a pop-up reminder which appears every time I go to
close Excel - reminding me to do xyz within the sheet - any idea how I
go about this?

[email protected]

Pop up reminder when closing Excel
 
Hi
With your excel file open:
Go to Tools, Macros, Visual Basic Editor
You will see your file name in the left hand window, with sheet names
and ThisWorkBook below it.
Double click ThisWorkBook
Paste in this code

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Response As VbMsgBoxResult
Response = MsgBox("Did you do xyz?", vbYesNo, "Help saving your file")
If Response = vbNo Then Cancel = True
End Sub

Change as required.
regards
Paul

On Jul 2, 11:14*am, Gareth Wretham wrote:
I want to create a pop-up reminder which appears every time I go to
close Excel - reminding me to do xyz within the sheet - any idea how I
go about this?



Gareth Wretham

Pop up reminder when closing Excel
 
Excellent - thanks Paul.

On Jul 2, 11:55*am, wrote:
Hi
With your excel file open:
Go to Tools, Macros, Visual Basic Editor
You will see your file name in the left hand window, with sheet names
and ThisWorkBook below it.
Double click ThisWorkBook
Paste in this code

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim Response As VbMsgBoxResult
Response = MsgBox("Did you do xyz?", vbYesNo, "Help saving your file")
If Response = vbNo Then Cancel = True
End Sub

Change as required.
regards
Paul

On Jul 2, 11:14*am, Gareth Wretham wrote:



I want to create a pop-up reminder which appears every time I go to
close Excel - reminding me to do xyz within the sheet - any idea how I
go about this?- Hide quoted text -


- Show quoted text -




All times are GMT +1. The time now is 11:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com