How to Fix Access Error 16388 When Pressing Escape in Excel
Question details
The user needs a solution to prevent Microsoft Access VBA from throwing Error 16388 (Code execution has been interrupted) when pressing the Escape key in Microsoft Excel or other desktop applications.

- Product
- Microsoft Access and Excel
- Device & OS
- not provided
- Scenario
- Running continuous VBA code in Microsoft Access in the background while actively working and using the keyboard in Excel or other programs.
- Observed behavior
- Pressing the Escape key in any application globally interrupts the running Access VBA code, triggering Error 16388 and hijacking the Escape key function from the active program.
Manually stop any continuously looping VBA scripts in Microsoft Access and save your code progress before attempting to modify application settings or error handlers.
Test Applications in Safe Mode
Launch Office applications in Safe Mode to determine if third-party add-ins or vendor utilities are interfering with the Escape key globally.
Sometimes, background laptop utilities or hidden Office add-ins capture global keyboard hooks, causing the Escape key to register incorrectly across applications. Running in Safe Mode isolates the core Microsoft programs.
Fully exit Microsoft Access, Microsoft Excel, and any other running programs.
Hold down the 'Ctrl' key on your keyboard and double-click the Microsoft Access shortcut. Click 'Yes' when asked if you want to start in Safe Mode.
Hold down the 'Ctrl' key and double-click the Microsoft Excel shortcut. Accept the prompt to launch in Safe Mode.
Start the continuous VBA execution in Access, switch over to Excel, and press the Escape key to see if the interruption error still occurs.

Modify the VBA CancelKey Property
Change how the application handles user interrupt signals to prevent the Escape key from breaking the continuous code execution.
Contact Microsoft Support for Cross-Application Bugs
Escalate the issue to Microsoft Support if the global keyboard hijacking persists across non-Office applications.
Switch to WPS Office for a Stable, Lightweight Experience
If continuous Microsoft Office VBA errors and cross-application interference disrupt your workflow, consider trying WPS Office. It provides a lightweight, highly compatible alternative for your spreadsheet, presentation, and document needs without heavy background process lockups.
- 1. Download the Installer: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the downloaded executable file and follow the on-screen instructions.
- 3. Open Your Files: Launch WPS Spreadsheets and open your existing .xlsx files directly with full formatting preserved.

Frequently Asked Questions
Why does pressing Escape in Notepad++ interrupt Access VBA?
During continuous processing or tight loops, the Office VBA runtime can sometimes excessively poll the operating system for interrupt signals. This causes it to globally hook the Escape key, interpreting an Escape press in any application as a command to break its own execution.
Is Ctrl+Break better than Escape for stopping VBA?
Yes. In the Microsoft Office Windows environment, Ctrl+Break is the preferred and more stable method for intentionally breaking code execution. Relying on the Escape key often leads to unexpected application behavior.
Can hidden breakpoints cause Error 16388?
While phantom or hidden breakpoints can randomly pause VBA code execution and cause similar interruption messages, Error 16388 coupled with a global Escape key press is specifically tied to the keyboard interrupt listener rather than ghost breakpoints.




