How should i call below function

W

writetoevv

Hi Friends

Kindly let me know how can i use below function in excel.
can u provide function with sample data.


Private Declare Function URLDownloadToFile Lib ""urlmon"" Alias ""URLDownloadToFileA"" (ByVal pCaller As Long, ByVal szURL As String, ByVal szFileName As String, ByVal dwReserved As Long, ByVal lpfnCB As Long) As Long
Sub GetPageTitle()
Dim i As Long, url As String, lst As Long
lst = Sheet5.Range(""A"" & Rows.Count).End(xlUp).Row
For i = 2 To lst
DoEvents
url = ""http://www.nseindia.com/content/historical/EQUITIES/"" & Sheet5.Range(""B"" & i).Value & ""/"" & Sheet5.Range(""C"" & i).Value & ""/"" & Sheet5.Range(""D"" & i).Value
URLDownloadToFile 0, url, ""C:\Users\Dave3009\Documents\nseindia\"" & Sheet5.Range(""D"" & i).Value, 0, 0
Next
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top