Having to press ESC to get code to run

zkosky

Board Regular
Joined
Apr 13, 2004
Messages
60
I have a small VBA Sub that I wrote to insert one list of employees into another list of employees based on certain criteria. Simple enough. I ran it several dozen times without any problems, but today it just started freezing on random employees that were different every time I ran it. When I hit ESC it asked if I wanted to Debug or Continue. I would click Continue and it would keep going through the list as if nothing had happened. It would do this several times and each time I would do the ESC thing to keep it going. I didn't change my code, so I'm confused as to why this is happening now.

This might be a clue ... It often happens even if I haven't touched my keyboard after I hit RUN. BUT if I try to switch to another application while it runs, it always happens.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
What is your actual code, perhaps one can optimize / rewrite it.
 
Upvote 0

Forum statistics

Threads
1,215,492
Messages
6,125,116
Members
449,206
Latest member
burgsrus

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