Forum

How to run macro be...
 
Notifications
Clear all

How to run macro between a time range in VBA

2 Posts
2 Users
0 Reactions
98 Views
(@mr_himalayan890)
Posts: 1
New Member
Topic starter
 

1. I open my PC at 7 AM

2. I want to run my macro (Org90) at 9 AM 

3. Then I want my macro (Org90) to run every 1 hour

4. At last I want my macro to stop working at 5 PM automatically daily.

I searched all internet that I can, but I didn't get a full answer to my question.

I know it is possible to do, but don't have any clue how to start it as I'm very new to VBA.

I'm self-learning and made a macro (Org90) to copy some data then organise it and paste it into another sheet.

Could you please help me with how can I achieve this? Thanks in advance for your help.

 
Posted : 24/05/2022 7:31 am
(@debaser)
Posts: 838
Member Moderator
 

As long as you open Excel before 9AM, you can use Application.Ontime to schedule the macro running. 

 
Posted : 24/05/2022 12:23 pm
Share: