Internet Explorer venster activeren en tabblad selecteren

Status
Niet open voor verdere reacties.

Jumping

Gebruiker
Lid geworden
28 mei 2007
Berichten
111
Ik heb een code gemaakt waarmee ik met een druk op de knop kan controleren of een pagina al geopend is, code:

Function FotoAlbumOpen() As Boolean
Dim objShell As Object, objShellWindows As Object, sWin As Object, x As Integer
Dim MyURL As Long, URLFound As String, URLNeeded As String

Set objShell = CreateObject("Shell.Application")
Set objShellWindows = objShell.Windows

For Each sWin In objShellWindows
On Error Resume Next
URLFound = sWin.Application.Document.Title
URLNeeded = "Mijn eerste foto-album"

MyURL = StrComp(URLFound, URLNeeded, 1)
If MyURL = 0 Then
FotoAlbumOpen= True
Exit Function
Else
FotoAlbumOpen= False
End If

If Err Then
Err.Clear
End If

Next

Set sWin = Nothing
Set objShellWindows = Nothing
Set objShell = Nothing

End Function


Hoe kan ik nu het fotoalbum activeren en dan het tabblad waar het fotoalbum op staat?
 
Status
Niet open voor verdere reacties.
Terug
Bovenaan Onderaan