Hi,
Hope you can help with this infuriating issue.
I have a ASP web page one section of which allows me to remove certain data from the page by click a "Close" link. The link is a straight forward HTML affair, and I can automate the clicking of it, however, it comes up with a confirmation box with an OK and Cancel button on it. My code then hands until I click OK.
I had seen a previous post on here advising to change the attribute of the button but that comment related to a Javascript settup which this is not.
The only solutions I can find when I am googling are relating to using Sendkeys, which NEVER works for me. Are there any alternatives?
My Current code is as follows, but always dies as soon as I hit the a.click statement:
I have a similar issue with another automation that needs to download a file, I do not know there either how to click the Open button on te standard IE message box, I assume the solutions will be similar for bother issues???
Any assistance would be greatly appreciated!
niteblind
Hope you can help with this infuriating issue.
I have a ASP web page one section of which allows me to remove certain data from the page by click a "Close" link. The link is a straight forward HTML affair, and I can automate the clicking of it, however, it comes up with a confirmation box with an OK and Cancel button on it. My code then hands until I click OK.
I had seen a previous post on here advising to change the attribute of the button but that comment related to a Javascript settup which this is not.
The only solutions I can find when I am googling are relating to using Sendkeys, which NEVER works for me. Are there any alternatives?
My Current code is as follows, but always dies as soon as I hit the a.click statement:
Code:
Sub test()
Dim appIE As InternetExplorer
Dim sURL As String
Dim ElementCol As MSHTML.IHTMLElementCollection
Application.ScreenUpdating = False
Set appIE = New InternetExplorer
sURL = "http:// ..."
With appIE
.Navigate sURL
.Visible = True
End With
Do While appIE.Busy
Loop
'NEXT LOOOP NEEDED FOR THE ASP PAGE TO LOAD PROPERLY
timedelay = Now()
Do Until (Now() > timedelay + TimeValue("00:00:05"))
Loop
Set ElementCol = appIE.Document.getElementsByTagName("A")
For Each a In ElementCol
Select Case a.ID
Case Is = "Close"
a.Click
Exit For
End Select
Next
Any assistance would be greatly appreciated!
niteblind
Last edited: