Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how cani create a pop up reminder when closing excel?

i want to create a pop up window so when i x excel, it pops up like an error
message. so it says 'did you remember to update total of customers' with a
yes and return button. Please help me :D
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default how cani create a pop up reminder when closing excel?


Hi,

Alt + F11 to open vb editor. Double click this workbook and paste this in

Private Sub Workbook_BeforeClose(Cancel As Boolean)
msg = "Did you remember to update total of customers?"
response = MsgBox(msg, vbYesNo)
If response = vbNo Then
Cancel = True
End If
End Sub

Mike
"riley2007" wrote:

i want to create a pop up window so when i x excel, it pops up like an error
message. so it says 'did you remember to update total of customers' with a
yes and return button. Please help me :D

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 638
Default how cani create a pop up reminder when closing excel?

Do you mean when you close a particular workbook? If so, open the
VBE, select the ThisWorkbook module and place this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Did you remember to update total " & _
"of customers?", vbYesNo) = vbNo Then Cancel = True
End Sub

riley2007 wrote:
i want to create a pop up window so when i x excel, it pops up like an error
message. so it says 'did you remember to update total of customers' with a
yes and return button. Please help me :D


  #4   Report Post  
Junior Member
 
Posts: 2
Default

Quote:
Originally Posted by JW[_2_] View Post
Do you mean when you close a particular workbook? If so, open the
VBE, select the ThisWorkbook module and place this:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
If MsgBox("Did you remember to update total " & _
"of customers?", vbYesNo) = vbNo Then Cancel = True
End Sub

riley2007 wrote:
i want to create a pop up window so when i x excel, it pops up like an error
message. so it says 'did you remember to update total of customers' with a
yes and return button. Please help me :D
Hi
I am a real novice at this so I hope someone can help.
I am trying to use the above code to bring up a message when someone tries to close the workbook.
I can't get it to work.
I already have a module 1 so would you place this in module 2(which I have tried )
If someone could go through it step by step would be a great help.
The message that I want to come up is "Have you Protected the Sheets"
with the option to comfirm or return .

Cheers
  #5   Report Post  
Junior Member
 
Posts: 2
Default

Quote:
Originally Posted by aceuk View Post
Hi
I am a real novice at this so I hope someone can help.
I am trying to use the above code to bring up a message when someone tries to close the workbook.
I can't get it to work.
I already have a module 1 so would you place this in module 2(which I have tried )
If someone could go through it step by step would be a great help.
The message that I want to come up is "Have you Protected the Sheets"
with the option to comfirm or return .

Cheers
Just managed to work it out
So I'm ok
Cheers
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how cani multiply cosine of an angle with a number,Ex cos60*2 formula calculation New Users to Excel 1 February 20th 07 06:05 PM
i enter a lot of data in xl. cani create a form nk suresh Excel Discussion (Misc queries) 1 November 4th 06 11:36 AM
Reminder in Excel? Gary Excel Worksheet Functions 2 September 27th 06 10:26 PM
Turn Off save prompt, reminder when closing modified WORD... S. Nyman New Users to Excel 5 June 30th 06 01:23 PM
How canI view excel files on the taskbar? Bert Excel Discussion (Misc queries) 2 August 22nd 05 05:44 PM


All times are GMT +1. The time now is 02:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"