Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default hyperlinks saving error in code


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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default hyperlinks saving error in code


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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 206
Default hyperlinks saving error in code


Use ampersand (&), not plus (+) to join a string variable.

url1 = "http://abcd.com/"& abc &"abc.csv"
"C:\HISDATA\"& abc &".xls"


Mike F
"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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
hyperlinks fail after saving Eric Lee Excel Discussion (Misc queries) 3 October 16th 06 04:46 PM
Saving Hyperlinks Iain Campbell New Users to Excel 1 August 23rd 05 02:47 PM
Saving Hyperlinks Jodi Excel Discussion (Misc queries) 1 May 13th 05 08:51 PM
Saving Absolute Hyperlinks BillT[_2_] Excel Programming 10 July 1st 04 11:59 AM
ChartCalculate code causing error when saving workbook Pete McCosh[_5_] Excel Programming 0 February 19th 04 03:00 PM


All times are GMT +1. The time now is 02:37 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"