ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   linking script for hyperlinks for excel (https://www.excelbanter.com/setting-up-configuration-excel/161346-linking-script-hyperlinks-excel.html)

Steph

linking script for hyperlinks for excel
 
Does anybody know how to set up a linking script, so to speak, for Excel? I
have a link path to 500 folders that incrementally goes up by one number.
0000, 0001, 0002-0500. I am trying to avoid making 500 separate links and
only running a script to create links and only having to change the last 4
numbers by hand. Adobe has a function with linking script and exporting
bookmarks and links. Please let me know if you have any idea to help. Thank
you in advance,

Steph


Paul Cordts

linking script for hyperlinks for excel
 
You could use a routine like this in Visual Basic

Sub Hyperlink()
Range("A1").Select
For A = 1 To 100

linknm = "C:\Documents and Settings\username\My Documents\Book" + CStr(A) +
".xls"
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
linknm, TextToDisplay:=CStr(A)
ActiveCell.Offset(1, 0).Select
Next A
End Sub

--
Paul Cordts


"Steph" wrote:

Does anybody know how to set up a linking script, so to speak, for Excel? I
have a link path to 500 folders that incrementally goes up by one number.
0000, 0001, 0002-0500. I am trying to avoid making 500 separate links and
only running a script to create links and only having to change the last 4
numbers by hand. Adobe has a function with linking script and exporting
bookmarks and links. Please let me know if you have any idea to help. Thank
you in advance,

Steph


Steph

linking script for hyperlinks for excel
 
Dumb question - how do I use a routine on column A? Sorry for the ignorance
but I am not an Excel expert barely user friendly. I just knew there was an
easier way to do what I have been doing for 2 weeks. Any help will be
helpful. Thank you.

"Paul Cordts" wrote:

You could use a routine like this in Visual Basic

Sub Hyperlink()
Range("A1").Select
For A = 1 To 100

linknm = "C:\Documents and Settings\username\My Documents\Book" + CStr(A) +
".xls"
ActiveSheet.Hyperlinks.Add Anchor:=Selection, Address:= _
linknm, TextToDisplay:=CStr(A)
ActiveCell.Offset(1, 0).Select
Next A
End Sub

--
Paul Cordts


"Steph" wrote:

Does anybody know how to set up a linking script, so to speak, for Excel? I
have a link path to 500 folders that incrementally goes up by one number.
0000, 0001, 0002-0500. I am trying to avoid making 500 separate links and
only running a script to create links and only having to change the last 4
numbers by hand. Adobe has a function with linking script and exporting
bookmarks and links. Please let me know if you have any idea to help. Thank
you in advance,

Steph



All times are GMT +1. The time now is 05:21 AM.

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