SQUIDD
Well-known Member
- Joined
- Jan 2, 2009
- Messages
- 2,104
- Office Version
- 2019
- 2016
- Platform
- Windows
Hi
So beyond me this one.
I am getting a runtime error in the below code.
BUT
Only when i open the excel file from a scheduled task in task scheduler.
The code runs just fine if i manually open the file
the macro is called upon workbook open BTW.
Any ideas? thanks.
dave
So beyond me this one.
I am getting a runtime error in the below code.
BUT
Only when i open the excel file from a scheduled task in task scheduler.
The code runs just fine if i manually open the file
the macro is called upon workbook open BTW.
Any ideas? thanks.
dave
VBA Code:
Dim mybrowser As Selenium.ChromeDriver
Sub get_ip()
Set mybrowser = New Selenium.ChromeDriver 'error is here
mybrowser.AddArgument "--headless"
mybrowser.Get "https://www.showmyipaddress.eu/"
ip1 = mybrowser.FindElementByXPath("/html/body/div[2]/div/div/div/div[1]/div[1]").Text
'at this point i email myself the ip1.
ThisWorkbook.Save
Application.Quit
End Sub