Got error on execution of following code snippets:
Dim WithEvents Web As SHDocVw.InternetExplorer
Web = New SHDocVw.InternetExplorer
Sub Web_BeforeNavigate2()
Web.GetElementByID("ID").value = form1.grid1.get_textmatrix(0,0)
error: "current thread is not in a single-threaded apartment"
Sub Web_OnQuit()
Me.Close()
error: Cross-thread operation not valid: Control 'frmVBbrowser' accessed from a thread other than the thread it was created on.
How to make InternetExplorer run in same thread ?