http://www.myengineeringworld.net/2013/11/excel-vba-download-internet-files.html

http://www.lazerwire.com/2011/11/excel-vba-download-files-from-internet.html

http://www.cpearson.com/excel/downloadfile.aspx

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

Function DownloadFile(URL As String, LocalFilename As String) As Boolean
    Dim lngRetVal      As Long
    lngRetVal = URLDownloadToFile(0, URL, LocalFilename, 0, 0)
    If lngRetVal = 0 Then DownloadFile = True
End Function

Sub downfile()
    'http://www.cpearson.com/excel/downloadfile.aspx
    Dim sURL    As String
    Dim LocalFilename   As String
    Dim filename As String

    Const UNC = "C:\Documents and Settings\Ashish Koul\Desktop\sample
files\"
    filename = "fao_participant_oi_21022014.csv"

    sURL = "
http://nseindia.com/content/nsccl/fao_participant_oi_21022014.csv";
    LocalFilename = UNC & filename

End Sub







On Sun, Feb 23, 2014 at 12:39 PM, Shankhajit Srimani <
srimani202...@gmail.com> wrote:

> Hi,
>
> I have a requirement to download a lot of historical data files from the
> archieve of an website. The url goes something like this:
> *http://nseindia.com/content/nsccl/fa...i_21022014.csv*<http://nseindia.com/content/nsccl/fao_participant_oi_21022014.csv>
>
> This downloads file for 21022014 ie. 21-Feb-2014. I need to be able to
> have a facility to have a selection criteria on my user form (in excel)
> where I specify a date range and the macro automatically downloads all the
> valid excel files available within that date range (*files for Saturday,
> Sunday and some holiday dates will not be available in the website archive
> database*) one after the other (like at single clcik of button) into a
> specific location (predefined viz.. c:/Users/EOD files/) on my laptop.
>
> Request an urgent help and response please.
>
> Regards
> Shankhajit
>
>  --
> Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's
> =TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @
> https://www.facebook.com/discussexcel
>
> FORUM RULES
>
> 1) Use concise, accurate thread titles. Poor thread titles, like Please
> Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice
> will not get quick attention or may not be answered.
> 2) Don't post a question in the thread of another member.
> 3) Don't post questions regarding breaking or bypassing any security
> measure.
> 4) Acknowledge the responses you receive, good or bad.
> 5) Jobs posting is not allowed.
> 6) Sharing copyrighted material and their links is not allowed.
>
> NOTE : Don't ever post confidential data in a workbook. Forum owners and
> members are not responsible for any loss.
> ---
> You received this message because you are subscribed to the Google Groups
> "MS EXCEL AND VBA MACROS" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to excel-macros+unsubscr...@googlegroups.com.
> To post to this group, send email to excel-macros@googlegroups.com.
> Visit this group at http://groups.google.com/group/excel-macros.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
*Regards*

*Ashish Koul*


*Visit*
http://www.excelvbamacros.in
Like Us on 
Facebook<http://www.facebook.com/pages/Excel-VBA-Codes-Macros/151803898222297>
Join Us on Facebook <http://www.facebook.com/groups/163491717053198/>


P Before printing, think about the environment.

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It's 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to