hyperlinks saving error in code

E

ezil

I used the following code for saving files from hyperlinks but it saves the
file from which macro is launched and not the file from hyperlink. Help me to
correct the code (dummy hyperlink address given)

Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error GoTo ErrHandler
For i = 11 To 16
Worksheets("abcd").Select
abc = Cells(i, 3)
url1 = "http://abcd.com/"+abc+"abc.csv"
ActiveWorkbook.FollowHyperlink Address:=url1, _
NewWindow:=False, AddHistory:=True
ActiveWorkbook.SaveAs Filename:= _
"C:\HISDATA\" + abc + ".xls"
Workbooks(abc).Close
label1:
Next i
ErrHandler:
GoTo label1
 
J

Jim Cone

See... http://support.microsoft.com/KB/555375
--
Jim Cone
Portland, Oregon USA



"ezil"
wrote in message
I used the following code for saving files from hyperlinks but it saves the
file from which macro is launched and not the file from hyperlink. Help me to
correct the code (dummy hyperlink address given)

Application.DisplayAlerts = False
Application.ScreenUpdating = False
On Error GoTo ErrHandler
For i = 11 To 16
Worksheets("abcd").Select
abc = Cells(i, 3)
url1 = "http://abcd.com/"+abc+"abc.csv"
ActiveWorkbook.FollowHyperlink Address:=url1, _
NewWindow:=False, AddHistory:=True
ActiveWorkbook.SaveAs Filename:= _
"C:\HISDATA\" + abc + ".xls"
Workbooks(abc).Close
label1:
Next i
ErrHandler:
GoTo label1
 

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