Macro_Nerd99
Board Regular
- Joined
- Nov 13, 2021
- Messages
- 61
- Office Version
- 365
"On error goTo" is not working on this code.
I'm trying to prevent a runtime error from showing if someone has an outdated or missing webdriver or any other error when starting chrome.
How do I fix this?
I'm trying to prevent a runtime error from showing if someone has an outdated or missing webdriver or any other error when starting chrome.
How do I fix this?
VBA Code:
Public Sub Open_New_Browser_Session(website As String)
Set ch = New Selenium.ChromeDriver
On Error GoTo Error_Handler:
ch.Start
ch.get website
Exit Sub
Error_Handler:
MsgBox "error opening site"
End
End Sub