Pop up reminder when closing Excel

  • Thread starter Thread starter Gareth Wretham
  • Start date Start date
G

Gareth Wretham

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?
 
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
 
Excellent - thanks Paul.

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



- Show quoted text -
 
Excellent - thanks Paul.

On Jul 2, 11:55 am, (e-mail address removed) 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 <[email protected]> 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 -
 
Back
Top