On Page 4 of the MultiPage form I've created a WebBrowser1 object. On Page 4 there are 2 buttons: one for msn.com, the other for google.com. If the UserForm defaults to Page 4 when opened, the buttons work fine initially, but if one of the other Pages is selected, and then the user returns to Page 4, clicking either one of the buttons causes the macro to crash with an error message 'Navigate' of object 'IWebBrowser2' failed.
Private Sub CommandButton23_Click()
Me.WebBrowser1.Navigate ("https://www.msn.com")
End Sub
Private Sub CommandButton24_Click()
Me.WebBrowser1.Navigate ("https://google.com")
End Sub
It appears that the WebBrowser needs to be "refreshed" each time Page 4 gets re/loaded. One solution is to eliminate the WebBrowser1 object from the UserForm and dynamically created a WebBrowser (wbr, below) initially, and then each time Page 4 is reselected.
I can't take credit for this solution - it was actually on another post in stackoverflow for a different problem!
Check it out: Resizing WebBrowser Control on Excel UserForm with DPI