Hi guys,
I don't understand the Selenium language yet and would need to adapt a macro that I used in IE to be able to use it in Edge. I have installed selenium basic and edge webdriver.
My macro copied the text from a web page and pasted it into an excel cell. I would appreciate any help.
Thanks a lot.
My macro is:
I don't understand the Selenium language yet and would need to adapt a macro that I used in IE to be able to use it in Edge. I have installed selenium basic and edge webdriver.
My macro copied the text from a web page and pasted it into an excel cell. I would appreciate any help.
Thanks a lot.
My macro is:
VBA Code:
Public Declare PtrSafe Function ShowWindow& Lib "user32" _
(ByVal hwnd As Long, ByVal nCmdShow As Integer)
Sub LoginWebReports2()
Dim ie As Object
Set objWSS = CreateObject("WScript.Shell")
Set ie = CreateObject("InternetExplorer.Application")
With ie
.Visible = True
.navigate "https://www.commodity3.com/content/41/energy-news"
Application.Wait Now + TimeValue("0:00:05")
Do While .Busy: DoEvents: Loop
Do While .readyState <> 4: DoEvents: Loop
End With
ie.ExecWB OLECMDID_SELECTALL, OLECMDEXECOPT_DODEFAULT
ie.ExecWB OLECMDID_COPY, OLECMDEXECOPT_DODEFAULT
Windows("Precios.xlsm").Activate
Sheets("Hoja1").Select
Range("A1").Select
ActiveSheet.Paste
Set ie = Nothing
Exit Sub
End Sub