Save from Hyperlink

Is there a way to save a file from a hyperlink?

In other words, save the Excel file from:  http://www.dof.ca.gov/HTML/DEMOGRAP/Data/RaceEthnic/Population-00-50/documents/Stanislaus.xls

to 'C:\temp'

thanks in advance

Michael
LVL 7
UniqueDataAsked:
Who is Participating?
 
Rey Obrero (Capricorn1)Connect With a Mentor Commented:


Dim xlObj As Object, fname As String
fname = "http://www.dof.ca.gov/HTML/DEMOGRAP/Data/RaceEthnic/Population-00-50/documents/Stanislaus.xls"
    Set xlObj = CreateObject("Excel.Application")
    xlObj.workbooks.Open fname
    xlObj.activeworkbook.SaveAs "C:\temp\myXXX.xls"
    xlObj.Quit
    Set xlObj = Nothing

0
 
iceblockCommented:
If you want to do it in VBA, this link might help.
http://www.mvps.org/access/modules/mdl0037.htm

I've used it before to do similar stuff.
0
 
UniqueDataAuthor Commented:
Perfect...

thanks for the perfect solution, as usual.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.