Forum Discussion

Massimo Paolini's avatar
Massimo Paolini
Copper Contributor
Oct 02, 2025

VBA New Edge Web Browser Control in Access - Wait for Page Load

Using the new Edge Browser Control in Access, How to wait the time of loading page to give the next command in VBA.

2 Replies

  • I entered "javascript page finished loading" and got several promising hits, including using the window.onload event.

    • Massimo Paolini's avatar
      Massimo Paolini
      Copper Contributor

      some example code? like this... 

      Dim jsCode As String

      jsCode = "window.onload = function() { window.external.PageLoaded(); };" ' Inject this script into the page 

       

      or the old one 

      Do While EdgeBrowser.ReadyState <> READYSTATE_COMPLETE

      DoEvents

       Loop

       

Resources