Make time between two macros


In the file are two buttons

De button print naar pdf has the choise

Yes or no

The button no start two macros

The first macro runs and i want dat the

Second macro start 5 seconds later than the first macro

Thanks for the answers



This is an english forum, if you can redo your question in english, it will be easier to help you.
don (rep: 1745) Feb 4, '20 at 5:58 am
What happens? Nothing? You have to replace "my_macro" with the name of your macro. And please put your comment in the Discuss section next time)
don (rep: 1745) Feb 7, '20 at 2:47 am
Add to Discussion


Selected Answer

Put something like this in your code:

'Tells Excel when to next run the macro.
Application.OnTime Now + TimeValue("00:00:05"), "my_macro"

The macro should run around 5 seconds after it hits this line - it might be better to put this line at the end of your first macro though.



Ok thanks you for the solution
Seppe (rep: 4) Feb 7, '20 at 3:52 am
Add to Discussion

Answer the Question

You must create an account to use the forum. Create an Account or Login