Features on daily attendance sheets

bh24524

Active Member
Joined
Dec 11, 2008
Messages
321
Office Version
  1. 2021
  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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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,215,409
Messages
6,124,730
Members
449,185
Latest member
ekrause77

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