Does anybody know how to set focus onto an IE object with Visual Basic? I\'ve tried myieobject.SetFocus
, but the compiler errors with this statement.
set .Visible=True
- if you've lost the screen somewhere in popups, you would have to loop through window titles to activate a specific title.
Dim objShell As Shell
Dim objIndex As InternetExplorer
Set objShell = New Shell
For Each objIndex In objShell.Windows
If TypeName(objIndex.Document) = "HTMLDocument" Then
If InStr(objIndex.Document.Title, "Stack Overflow") > 0 Then
objIndex.Visible = True
Exit For
End If
End If
Next objIndex
Here's what you can do with the IE object: MSDN