logo
search
VBA & Macro Problems

How to Debug Edge Browser Control Events in Access VBA

Huma Ashraf ChHuma Ashraf Ch Sep 27, 2026 869 views

Question details

The user needs to troubleshoot an issue where VBA breakpoints in Microsoft Access Edge browser control events stop execution completely instead of pausing, causing F8 or F5 commands to fail.

Product
Microsoft Access 365
Device & OS
not provided
Scenario
Debugging VBA event code associated with the modern Edge web browser control within an Access database form.
Observed behavior
Execution stops entirely at breakpoints, and debugging keys like F5 or F8 fail to continue execution, likely due to a lost connection to the form or the browser control dropping the thread.
Before you start

Ensure your Microsoft Access 365 is updated to the latest version, and verify that the Edge WebView2 runtime is properly installed and active on your system.

Solution 1Recommended

Utilize Debug.Print and Logging Instead of Breakpoints

Since the Edge browser control does not tolerate execution interruption well, use non-blocking debugging methods to trace code execution.

The modern Edge web browser control in Access operates asynchronously. Standard VBA breakpoints pause the main thread, which can cause the non-VBA browser code to drop the connection to the form or fail to resume.

To prevent execution from halting abruptly, avoid traditional breakpoints (F9) and step-through debugging (F8) in these specific event handlers.

1
Remove Existing Breakpoints

Open your VBA editor and locate the Edge browser control event procedures. Remove any existing red breakpoint dots by clicking them in the margin or pressing F9.

2
Insert Debug.Print Statements

Add 'Debug.Print "Event triggered: " & Err.Description' (or similar variable tracking) at key points in your event code to monitor the flow without stopping it.

3
Run and Monitor

Run the form normally without pausing. Press Ctrl+G to open the Immediate Window in the VBA editor and review the printed logs to track execution flow.

Utilize Debug.Print and Logging Instead of Breakpoints
Alternative Logging: For complex events, consider writing logs to a local text file using the FileSystemObject to track execution timing and variables without relying on the Immediate Window.
Free Microsoft Office alternative

Looking for a Lightweight Microsoft Office Alternative?

While debugging advanced Microsoft Access VBA controls requires specialized workarounds, everyday document, spreadsheet, and presentation tasks shouldn't be complicated. WPS Office offers a free, lightweight suite with high compatibility and advanced macro capabilities.

  1. 1. Download the Installer: Visit the official WPS Office website and click the Free Download button.
  2. 2. Install WPS Office: Run the downloaded installer and follow the simple on-screen instructions.
  3. 3. Open Your Files: Launch WPS Office to immediately start working with your existing Office documents, spreadsheets, and presentations.
Free and lightweight suite for everyday documentation tasks.High compatibility with Microsoft Office formats like DOCX, XLSX, and PPTX.Includes advanced spreadsheet capabilities with VBA and Macro support in WPS Spreadsheet.Familiar user interface requiring zero learning curve.
microsoft office alternative - wps office

Frequently Asked Questions

Why does F8 (Step Into) stop working in Access browser events?

The modern Edge browser control relies on underlying non-VBA web technologies that do not handle being interrupted by the VBA debugger. When you pause execution, the connection to the form may drop or the thread may terminate, causing debugging to fail.

Can I use the old WebBrowser control for easier debugging?

The legacy Internet Explorer-based WebBrowser control might behave differently with breakpoints, but it is deprecated and lacks support for modern web standards. It is highly recommended to stick with the modern Edge control and adapt your debugging methods.

Where can I find more information about the Access modern web browser control?

You can consult official Microsoft documentation regarding the Edge WebView2 control in Access, or search for specialized Access MVP articles, such as those by Daniel Pineault, which detail limitations and community-driven workarounds.