Excel VBA Scheduled message pop up box reminder

0 votes

I want to write a script that sends a message box on a given day of the week at a specific hour. Monday at 10 a.m., for instance.

Sub Reminder()
    
    Dim time As Range
    Set time = Sheets("Main").Range("W11")

    
    If time.Value = "Monday 10:00" Then
        MsgBox "Time reminder"
    End If
    
    
End Sub

I have a cell in "W11" that is formatted to display the day and time and to match the if function in an attempt to make this work, but it still doesn't appear to want to. I'm not sure what I was doing differently, but I had it almost functioning earlier; however, the message box would appear every time I clicked for a whole minute and wasn't just one instance. It looks like it ought to be really easy.

Feb 3, 2023 in Others by Kithuzzz
• 38,000 points
1,095 views

1 answer to this question.

0 votes
What exactly does W11 contain? In Excel, formatting merely affects how the date appears; the date's actual contents remain unchanged. The appearance may be "Monday 10:00" while the content could be "1/1-2023 10:00." Therefore, W11 is not equivalent to "Monday 10:00."

The current code will also never function as expected unless it is executed exactly on Monday at 10 AM. To do that, you will need a time range, a constantly listing "listener," or the ability to check whether the current date and time are greater than Monday 10:00.
answered Feb 3, 2023 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
1 answer

Can I show a formula result in a pop-up window in Microsoft Excel?

Yes, you can display the formula result—that ...READ MORE

answered Nov 12, 2022 in Others by narikkadan
• 63,600 points
731 views
0 votes
1 answer

Having issues with pop-up alert in excel. (Visual Basic)

You may find the following code of ...READ MORE

answered Feb 4, 2023 in Others by narikkadan
• 63,600 points
655 views
0 votes
1 answer

Excel VBA function that cross references two data sets to come up with one solution

Solution using dictionary to count Public Sub citizens() ...READ MORE

answered Feb 16, 2023 in Others by narikkadan
• 63,600 points
805 views
0 votes
1 answer

Autofill Copy down up until next empty row- Excel VBA Macro

Row 1048576 will be returned by end(xldown) ...READ MORE

answered Feb 18, 2023 in Others by narikkadan
• 63,600 points
1,537 views
0 votes
1 answer

VBA - Msgbox inside a Loop

 Try this: Private Sub CommandButton1_Click() ...READ MORE

answered Mar 19, 2023 in Others by Kithuzzz
• 38,000 points
711 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,211 views
0 votes
1 answer

How to load file to Excel Power query from SFTP site

Currently, I don't think there is a ...READ MORE

answered Dec 3, 2018 in Power BI by Upasana
• 8,620 points
3,662 views
0 votes
1 answer

Using VBA Excel to create a gramatically correct list

The Excel AND function is a logical ...READ MORE

answered Feb 9, 2022 in Others by gaurav
• 23,260 points
906 views
0 votes
2 answers

Excel VBA App stops spontaneously with message "Code execution has been halted"

Solution Press the "Debug" button in the popup. Press Ctrl+Pause|Break twice. Hit ...READ MORE

answered Sep 29, 2022 in Others by narikkadan
• 63,600 points
1,172 views
0 votes
1 answer

Speed up Excel vba program

Not at all. I used it. You ...READ MORE

answered Oct 20, 2022 in Others by narikkadan
• 63,600 points
745 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP