View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Doug Doug is offline
external usenet poster
 
Posts: 460
Default hyperlink files on multiple computers

So do I enter the first part of this under the view code for that sheet and
then enter the second part in the hyperlink for that cell?
--



"Jim Cone" wrote:

If you referring to the "My Documents" folder as the parent folder
for the "Training Cycles" folder then you can determine that path on
any Windows XP system using the SpecialFolders property of
the Windows Script Host...
1. Create a user designed function (UDF) to return that folder path.
2. Use the returned path in the Hyperlink function...

'--
Function MyLocation() As String
Dim WSHShell As Object
Dim MyPath As String

Set WSHShell = CreateObject("WScript.Shell")
MyPath = WSHShell.SpecialFolders("MyDocuments")
MyPath = MyPath & "\Training Cycles"
MyLocation = MyPath
Set WSHShell = Nothing
End Function
'--

On a worksheet...
=HYPERLINK(MyLocation(),"nice name")

--
Jim Cone
Portland, Oregon USA





"Doug"
wrote in message
...
I currently have many hyperlinks to files that are in a single folder named
Training Cycles on my computer. If I want to transfer this to another
computer to be used also, how can I do this without changing all the file
extensions. For example, on one computer the file extention might be
"C:\Users\The King's\Documents\Training Cycles" and on another computer the
extension might be "C:\Users\John Doe's\Documents\Training Cycles". How can
I make this work?
--