Features on daily attendance sheets

bh24524

Active Member
Joined
Dec 11, 2008
Messages
365
Office Version
  1. 365
  2. 2007
Hi, I was wondering if there is something that could be put in an excel sheet, probably an event code macro I think they are called, that could give a pop-up message right before someone exits out of the file, basically giving them reminders of things to do before they close the file. If someone knows how to do this, I am looking for up to 3 different messages to appear, although they could be combined into 1 if necessary. The messages are:

"If early outs are offered to employees, did you log them on the sheet?"
"If there was MANDO, is there a Post and lift time?"
"Are all reason for absence columns filled in?"

Can something like this be done? I want to be able to present this to my supervisor and show them both options, one where there are 3 separate pop-ups, and one where they are combined. If anyone could assist, that would be great!
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
This can certainly be done. A simple macro displaying the messages combined would like like this:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    MsgBox ("If early outs are offered to employees, did you log them on the sheet?  If there was MANDO, is there a Post and lift time?  Are all reason for absence columns filled in?")
End Sub
The macro would be placed in the code module for ThisWorkbook. It can be modified to separate the messages based on certain conditions but we would need to know those conditions.
 
Last edited:
Upvote 0
This can certainly be done. A simple macro displaying the messages combined would like like this:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    MsgBox ("If early outs are offered to employees, did you log them on the sheet?  If there was MANDO, is there a Post and lift time?  Are all reason for absence columns filled in?")
End Sub
The macro would be placed in the code module for ThisWorkbook. It can be modified to separate the messages based on certain conditions but we would need to know those conditions.
Thanks for this. As for conditions, are you meaning the conditions in order for each message to come up? If so, basically the conditions are not needed, it is just a general reminder to the supervisors before they close the workbook. If one message pops up, the one that says about early outs for example, maybe they hit okay or whatever button comes up, and then the next message pops up after hitting okay. Hope that makes sense?
 
Upvote 0
This will display the messages one after the other:
Code:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
    MsgBox ("If early outs are offered to employees, did you log them on the sheet?")
    MsgBox ("If there was MANDO, is there a Post and lift time?")
    MsgBox ("Are all reasons for absence columns filled in?")
End Sub
 
Upvote 0
Okay, that worked. Now to show the supervisor, lol. Thanks for your help.
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top