Excel - macro en excel click boton web

 
Vista:

macro en excel click boton web

Publicado por jesus (1 intervención) el 11/03/2017 23:47:20
Estoy intentando hacer una macro en excel.
En una red local necesito abrir una web. Una vez cargada tiene que hacer click en un boton para abrir otra página.
El código html del botón es: input value="login" type="submit"
Agradezco la ayuda, porque estoy atascado en esto.

Dim InternetExplorer As Object
Set InternetExplorer = CreateObject("InternetExplorer.Application")

With InternetExplorer
.Visible = True
.Navigate "http://192.168.0.215/intro1.xml"

End With
Do Until InternetExplorer.Readystate = 4: DoEvents: Loop

Dim Elements As IHTMLElementCollection
Dim Element As IHTMLElement

'Set Document = InternetExplorer.Document

For Each Element In Elements

If Element.GetAttribute("value") = "login" Then Element.Invokemember ("click")
End If

Next
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder