How to click on link/path given in search result via vba

vbambre

New Member
Joined
Mar 29, 2020
Messages
4
Office Version
  1. 2010
Platform
  1. Windows
Hi,

I am new to internet explorer automation, and currently working on one macro.90
Macro need to do go to the specific url then search with code given in sheet and click on search button, after search in search result, i need click on 3rd column data "subject"(highlighted in below image) which will open one more small window open which contain data in table format. I want this data in excel front of code
i1.PNG



Query: I am able to write code till click in search button, but i am not able to write code to click on above highlighted subjects, I need help here. below is my code.
Thanks in advance :)

Sub feeder() ' ' feeder Macro ' Dim IE As Object Dim doc As HTMLDocument Dim vb As Object Set IE = CreateObject("InternetExplorer.Application") IE.Visible = True IE.navigate "https://www1.nseindia.com/corporates/corpInfo/equities/Announcements.html" Do While IE.Busy Or IE.readyState <> 4 Application.Wait DateAdd("s", 1, Now) Loop Set doc = IE.document For i = 13 To 50 doc.getElementById("company_name").Value = ThisWorkbook.Sheets("Data").Range("A" & i).Value doc.getElementById("ext-gen18").Click 'need code to select subjects in seach results and get the table data in excel Next End Sub
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
below is the code, please help me how can i select this link which will open new table window.
<div class="x-grid3-cell-inner x-grid3-col-3" unselectable="on" id="ext-gen141"><span style="color:blue; cursor:pointer; hover:underline" id="ext-gen142">Change in Director(s)</span></div>
 
Upvote 0
correct code
VBA Code:
<div class="x-grid3-cell-inner x-grid3-col-3" unselectable="on" id="ext-gen141"><span style="color:blue; cursor:pointer; hover:underline" id="ext-gen142">Change in Director(s)</span></div>
 
Upvote 0

Forum statistics

Threads
1,215,220
Messages
6,123,698
Members
449,117
Latest member
Aaagu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top