View Single Post
 
Old 11-11-2023, 09:14 PM
acmuller acmuller is offline Windows 10 Office 2010
Novice
 
Join Date: Nov 2023
Posts: 2
acmuller is on a distinguished road
Default Run an ms word vba macro before a specific time

In ms word, I have a VBA macro that runs each time I start Word. But I would like it to run only the first time I start my computer in the morning, not every time during the day. I have discovered the function of
Application.OnTime TimeValue("xxxx"),

But I would like it to run only before 11 am, and not after that. Or, on the first startup of Word
and not after that. I think I need to use a variable for the time value,
But I am not sure how that would work.

Any ideas?
Reply With Quote