Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88066

VBA Excel to find searched tab in Internet explorer

$
0
0

Below code is working fine only one thing is missing is that the code doesn't go to the searched tab in IE.

With CreateObject("Shell.Application").Windows
    If .Count > 0 Then
        Set IE = .Item(0)
        Set objShell = CreateObject("Shell.Application")
        IE_count = objShell.Windows.Count
        For x = 0 To (IE_count - 1)
            On Error Resume Next
            my_url = objShell.Windows(x).document.Location
            If my_url Like Sheets("Transfer Agency").Range("AB1") & "*" Then
                Set IE = objShell.Windows(x)
                '**How to activate/select the searched tab in IE**
                Exit For
            Else
            End If
        Next
    Else
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Visible = True
        IE.navigate Sheets("Transfer Agency").Range("AB1"), CLng(2048)
        Set IE = Nothing
    End If
End With

Viewing all articles
Browse latest Browse all 88066

Trending Articles