How to slow down a macro after pressing the escape key?

Waimea

Active Member
Joined
Jun 30, 2018
Messages
465
Office Version
  1. 365
Platform
  1. Windows
I have a macro that I speed up using the ESCAPE KEY.

When the macro hits a specific value, I would like to slow down the macro again.

Is this possible?

And could someone explain what happens when I press the ESCAPE KEY once when running a macro?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
How do you speed up the macro by using the ESC key? Please show your code. (I suggest code tags when you show code)
 
Upvote 0
Hi 6StringJazzer,

thank you for your reply.

It seems like if application.wait skips the waiting time when I press the ESCAPE key. Not sure why?

I have tried adding if statements with additional application.wait but the pressing of the ESCAPE key seems to ignore all additional wait commands.
 
Upvote 0
Not sure why the ESCAPE KEY is speeding up your macro, it usually stops a macro.
You can go into your code in VISUAL BASICS and press the F8 KEY. This will step through your macro one line at a time. I like to split my screen sometimes, so I can see the code and the worksheet at the same time.
Not sure if this is what you're looking for, but I hope it helps.
 
Upvote 0

Forum statistics

Threads
1,215,813
Messages
6,127,026
Members
449,352
Latest member
Tileni

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top