Automation of IE VBA drop-down list I need to select an option

Asked

Viewed 20 times

0

Hello guys I am performing a process of automating a site, more when I arrive at an option, it opens others that I can not select.

I am using this code "objIE.document.getElementById("img1.0_p"). Click" up to this point it fucks, but when it opens other options I can’t use the same code to select the second option.

follows my code:

'start a new subroutine called Searchbot Sub Searchbot()

'dimension (declare or set aside memory for) our variables
Dim objIE As InternetExplorer 'special object variable representing the IE browser
Dim aEle As HTMLLinkElement 'special object variable for an <a> (link) element
Dim y As Integer 'integer variable we'll use as a counter
Dim result As String 'string variable that will hold our result link

'initiating a new instance of Internet Explorer and asigning it to objIE
Set objIE = New InternetExplorer

'make IE browser visible (False would allow IE to run in the background)
objIE.Visible = True

'navigate IE to this web page (a pretty neat search engine really)
objIE.Navigate "link da minha empresa confidencial"

'wait here a few seconds while the browser is busy
Do While objIE.Busy = True Or objIE.readyState <> 4: DoEvents: Loop

'click the 'go' button
objIE.document.getElementById("img1.0_p").Click 

Internet code where I got the id from . Click:

<IMG id=img1.0_p style="DISPLAY: inline" src="images/tree_view/tv_plusdots.gif width=16 align=absMiddle height=20>

just below the option I want to select:

<IMG id=img1.0_p style="DISPLAY: inline" src="images/tree_view/tv_plusdots.gif width=16 align=absMiddle height=20>

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.