Fisrt of all I'm not a programmer, I'm a finance student so I make an Excel file with macro where all the fields of https://www.nseindia.com/products/content/equities/equities/eq_security.htm will filled automatically. However I'm unable to click How to click "Download file in csv format". What will be the VBA code to click on the link?
Private Sub CommandButton1_Click()
Dim IE As New InternetExplorer
Dim oW As Worksheet: Set oW = ThisWorkbook.Worksheets("Sheet1")
Dim oEleCol As MSHTML.IHTMLElementCollection
Dim oEle As MSHTML.IHTMLElement
With IE
'Set IE = CreateObject("InternetExplorer.Application")
' Set IE
.Visible = True
'ShowWindow .hwnd, SW_SHOWMAXIMIZED
' Navigate to URL
.Navigate "https://www.nseindia.com/products/content/equities/equities/eq_security.htm"
' Wait for page to be ready
While .Busy
DoEvents 'wait until IE is done loading page.
Wend
' Set criteria
.document.all("symbol").Value = oW.Range("B1")
.document.all("series").Value = oW.Range("B2")
.document.getElementById("rdDateToDate").Click
' Wait for page to be ready
While .Busy
DoEvents 'wait until IE is done loading page.
Wend
' Set remaining criteria
.document.all("fromDate").Value = oW.Range("B3")
.document.all("toDate").Value = oW.Range("D3")
' Submit criteria
.document.getElementById("submitMe").Click
' Wait for page to be ready
While .Busy
DoEvents 'wait until IE is done loading page.
Wend
' Find the link to download file
Set oEleCol = .document.getElementsByTagName("A")
For Each oEle In oEleCol
If oEle.innerHTML = "Download file in csv format" Then
oEleCol.Click
Exit For
End If
Next
' Wait for page to be ready
While .Busy
DoEvents 'wait until IE is done loading page.
Wend
End With
End Sub
Note - Parameter of input will be Symbol - SBIN Series - EQ Time period from - 1/1/2016 Time period to - 1/12/2016

oEleCol.ClickbeoEle.Click?