Ich will ein Programm schreiben, welches eine Website öffnet und auf dieser Website einen bestimmten (Export) button klickt.
Mein Code ist der folgende:
Sub CP_export()
Dim tags As Object
Dim tagx As Object
Dim wb As Object
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
Set wb = CreateObject("InternetExplorer.Application")
wb.Navigate "Adresse der Website"
Do: Loop Until wb.Busy = False
Set tags = wb.Document.GetElementsByTagname("button")
For Each tagx In tags
If tagx.alt = "Export" Then
tagx.Click
End If
Next
wb.Quit
With Application
.ScreenUpdating = True
.EnableEvents = True
End With
MsgBox "ok"
End Sub
Die Website wird auch geöffnet nur erscheint danach die genannte Fehlermeldung. Ich hoffe mir kann da jemand helfen.Viele Grüße
jojo