I have a userfrom inside of which a VBA WebBrowser was inserted. I have working code that calls this browser, but is throwing errors because, I think, of the deprecated IE.
I have installed Selenium Basic and webdriver.exe. I can open Edge, but when opened its not inside the user form, let alone anywhere in a worksheet. Any pointers would be appreciated. Here is what I have:
From a cmdbutton on a worksheet Macro "ShowBrowser" is called.
Sub ShowBrowser()
'Show the form.
WebBrowser.Show vbModeless
End Sub
The form is named WebBrowser. From Design Mode, the Microsoft Web Browser is inserted. On the properties window, it is renamed to ObjWebBrowser.
From the Project Explorer, I open the form, click View Code, I have this:
Private Sub ObjWebBrowser_Initialize()
Dim selenium_Obj As New Selenium.EdgeDriver
Call selenium_Obj.Start("edge", "https://google.com")
selenium_Obj.Wait 5000
End Sub
I have tried multiple approaches, but cannot find a way to open Edge inside the userform.