Pop up reminder when closing Excel

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?
 
P

paul.robinson

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
 
G

Gareth Wretham

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 -
 
Joined
Sep 23, 2017
Messages
6
Reaction score
0
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 -
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top