Excel VBA pop up message help

Status
Not open for further replies.

Josh381991

New Member
Joined
Nov 9, 2022
Messages
6
Office Version
  1. 2007
Platform
  1. Windows
Good afternoon,

I am super new to VBA and hoping for some help.

I have a training log for all employees which lists modules and dates of expiry. I am attempting to get a pop up that automatically tells me what employees have outstanding training due. I used and amended a code from the internet which I have posted below. This works to a degree in that it pulls up what is expiring but it pulls up the dates rather than the employees name as shown below.

The employees names are in column A5 to A37 with the modules being in Row 4 to column AO. The dates are within A5 to AO37.

The H1 bit in the code allows me to set number of days I wish to search ie all dates occurring within the next X days.

Ideally I would like the pop up to come up saying training due for the following employees. Employee A Module C Employee D Module X etc.

I really hope that makes sense.

Sub Due_Date()
Dim DueDate_Col As Range
Dim Due As Range
Dim PopUp_Notification As String
Set DueDate_Col = Range("C5:AO37")
For Each Due In DueDate_Col
If Due <> "" And Date >= Due - Range("H1") Then
PopUp_Notification = PopUp_Notification & " " & Due.Offset(0, -2)
End If
Next Due
If PopUp_Notification = "" Then
MsgBox "No outstanding training"
Else: MsgBox "Training due for these individuals: " & PopUp_Notification
End If
End Sub


Thank you in advance.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
This message is for Anthony47.
I have spread sheet with several trucks that regularly we need to be update casue of mechincal sercives done to Tractors. I will attached the excel sheet to see if you could help me to either create an automaticly macro or or script that will notify me when the next vehicles are due for their service. Maybe opening another excel page or highlightinh and moving to the top of the page when are getting closer to 60 days from their last date I recorded their service. let me know if there is something you think could help me to accomplish this automated sheet .
 

Attachments

  • image.gif
    image.gif
    129.1 KB · Views: 9
Upvote 0
You were wrong to queue you request on this old thread and address it to me: you lost the opportunity to receive support from thousands of experts...
Anyway...

You can easily obtain a list with the coming deadline using standard functions of XL2021

For example:
1) Add a new sheet to your workbook and name it "Coming" (or the name you prefer)
2) In A2 write 60, or any paeriod of days notice that you prefer
3) In B2 insert this formula:
Code:
=LET(EarlyWarn,A2,TruckList,'NameOfTheSheet'!A3:E1000,NextDeadline,'NameOfTheSheet'!B3:B1000,FILTER(TruckList,(TODAY()-NextDeadline)<EarlyWarn))
You need to customize the "fields" according your situation. Namely
-TruckList, should be followed by the coordinates of the table that list the trucks and their details
-NextDeadline, should be followed by the range (within the TruckList) that contains the deadline to be checked

This formula should return the list of the trucks whose deadline is within the threshold written in A2

Adapt to your need; if you don't succeed then specify which is the layout of your truck list and which column is the one with the deadline.
 
Upvote 0
Thank you for your help. I did repost it in a new thread after i did post directing to you. always learning
 
Upvote 0
I hope you can understand my knowledge is very limited and trying to make it happen will might not be ease but i will do my best to explain. Spread sheet name is 60 Dasy Tractor PMS. each columns is very similar but the one columns i really care about is D, lebael 60 Days. I have a list that cover three pages but if i can do this for few rows and columns i think i should be able to replicate it. what i just need is to use the warning option to warn me truck XX is almost due for service or close to 60 days in a secon page that pops on my screen each monirng so i can handle it first thing and schedule for outside company to pickup trucks and do service. Maybe highlight with a color and only those vehicles close to the 60 days
60 Days Schedule
TRUCKCurrent Date40 days60 DayANNUAL
1000
1001SD09/03/2110/13/2111/02/2103/02/21
1002SD11/15/2212/25/2201/14/23
1003AZ08/24/2210/03/2210/23/2209/24/21
100401/07/2302/16/2303/08/2301/07/23
1005 SD12/28/2202/06/2302/26/2304/30/21
100601/07/2302/16/2303/08/2301/07/23
 
Upvote 0
@Relearning for future reference
Please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,223,888
Messages
6,175,215
Members
452,618
Latest member
Tam84

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