+ Reply to Thread
Results 1 to 11 of 11

VBA macro to pop up messages at a specific time of the Day

  1. #1
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    VBA macro to pop up messages at a specific time of the Day

    Hi All

    I have a macro which I want to apply to a daily tasklist process. I want the macro to pop up alert at specific times during the day. At the moment it only pops up one alert, how can I tweak it to show several alerts during the day?

    Macro:

    Please Login or Register  to view this content.

    Other Alerts I want add and at which times:
    11:00:00 - "Mid-day Statement run starts in an hour"
    13:00:00 - "Afternoon Recs in 30min"
    14:00:00 - "Review settlement starts in an hour"
    16:35:00 - "EOD in starts in an hour"

    Any ideas on this is much appreciated.

    Thanks
    Last edited by Eustace07; 01-29-2020 at 05:42 PM.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,447

    Re: VBA macro to pop up messages at a specific time of the Day

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  3. #3
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    Done. Thanks Pepe.

  4. #4
    Registered User
    Join Date
    05-26-2014
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    Seems simple. You can call multiple Application.OnTime events with different execution times.

    Have each one call a different message sub. You could get more elegant and have a single message sub , and a select case structure based on the time of day , but keeping it simple would work too

  5. #5
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    I want to keep it simple by creating a single message sub. That said, I think I get your line of reasoning.

  6. #6
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    I've tried creating multiple Application.OnTime events for the various times but the macro is not working.

  7. #7
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Application.OnTime not working at set times

    I don't understand why when I hit F5 the code runs but on its own it doesn't run at the set times. Please can anyone review this for me will be much appreciated? I have a feeling I'm getting something wrong. Thanks


    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    Any help with this please? Sorry for asking one so many times.

  9. #9
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    I've tried below, it appeared to work for the first alert but it ceased after the first alert. Is there anything wrong with my procedure- Any ideas on this is much appreciated?

    Module 1
    Please Login or Register  to view this content.
    Module2

    Please Login or Register  to view this content.
    Last edited by Eustace07; 02-03-2020 at 06:15 PM.

  10. #10
    Forum Expert BMV's Avatar
    Join Date
    01-13-2020
    Location
    St-Petersburg, Russia
    MS-Off Ver
    2013-2016
    Posts
    1,329

    Re: VBA macro to pop up messages at a specific time of the Day

    Eustace07, your solution based on Excel is always on. I'm not sure it is good solution. It's better to use system task scheduler. For popup message you can use
    MSG * "Mid-day Statement run starts in an hour"
    Look switches for this command.

  11. #11
    Registered User
    Join Date
    10-23-2014
    Location
    Fife
    MS-Off Ver
    M365
    Posts
    49

    Re: VBA macro to pop up messages at a specific time of the Day

    Thanks BMV. I'm trying to explore an excel solution if that's possible. System task scheduler is a good idea however not ideal in my current setting either my team.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Outlook-automatically send messages to specific contacts
    By AlexAXL in forum Outlook Programming / VBA / Macros
    Replies: 2
    Last Post: 02-15-2019, 02:58 AM
  2. Automatically delete sent messages that have a specific subject
    By Bukovnik in forum Outlook Programming / VBA / Macros
    Replies: 1
    Last Post: 08-06-2016, 04:23 PM
  3. VBA to reply to all messages in a specific folder
    By Teblol in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2016, 01:47 PM
  4. [SOLVED] Code to run a Macro on a specific day of the week at a specific time.
    By mjfox52610 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-16-2013, 11:40 PM
  5. [SOLVED] Show the date and time in a specific cell of last time we run a macro
    By dragon_m0nsta in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2012, 04:49 AM
  6. Text box to move messages to a specific folder
    By Interex in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 04-24-2012, 05:39 PM
  7. macro to move messages from Sent Items from specific mailbox address
    By wotadude in forum Outlook Programming / VBA / Macros
    Replies: 4
    Last Post: 05-01-2009, 04:20 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1