Ok, should be a quick one. I'm struggling to do something that should be obvious. Must be a lack of cafeine or something. Anyway, any help greatly appreciated!
Below is some simple code in Excel. If it finds a tab in IE that contains google.co.uk, it opens a new tab next to it and loads vbforums.com. My problem is I want the IE window and the new tab to become active on my desktop once its been created. Seems so simple yet I can do it....! ....help...
Code:
Dim w As InternetExplorer
For Each w In CreateObject("shell.Application").Windows
If InStr(1, w.LocationURL, "google.co.uk") > 0 Then
w.Navigate "http://www.vbforums.com", , "_blank"
Exit For
End If
Next w