I have this script from a site that I use.
I would like a vba that would click on the button on whatever page I am in as the page address changes each time.
example.
I use
appactivate("Internet Explorer") and then I want to hit the button using script from there.
Also, do I need a specific reference installed to do this.
I tried the following.
Also tried
and tried
Code:
' [SIZE=2][COLOR=#a31515][SIZE=2][COLOR=#a31515]input[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]type[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]="submit"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]value[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]="Post this comment"[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#ff0000][SIZE=2][COLOR=#ff0000]name[/COLOR][/SIZE][/COLOR][/SIZE][SIZE=2][COLOR=#0000ff][SIZE=2][COLOR=#0000ff]="button"[/COLOR][/SIZE][/COLOR][/SIZE]
I would like a vba that would click on the button on whatever page I am in as the page address changes each time.
example.
I use
appactivate("Internet Explorer") and then I want to hit the button using script from there.
Also, do I need a specific reference installed to do this.
I tried the following.
Code:
sub Test()
ActivateWindow ("Internet Explorer")
ie.Document.getElementById("button").Click
End sub
Also tried
Code:
sub Test()
ActivateWindow ("Internet Explorer")
ie.Document.getElementById("Post this comment").Click
end sub
and tried
Code:
sub Test()
ActivateWindow ("Internet Explorer")
For x = 0 To 1
For i = 0 To ie.Document.forms(x).Length - 1
'MsgBox ie.Document.forms(x)(i).Value & " " & ie.Document.forms(x)(i).Type
If ie.Document.forms(x)(i).Value = "Set" And ie.Document.forms(x)(i).Type = "submit" Then
ie.Document.forms(x)(i).Click
Exit For
End If
Next i
Next x
end sub