ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How should i call below function (https://www.excelbanter.com/excel-discussion-misc-queries/440697-how-should-i-call-below-function.html)

[email protected]

How should i call below function
 
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



All times are GMT +1. The time now is 06:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com