Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default List Files as HyperLink through VBA

Hi

I am not sure if it is poosible, but I'll try to explain.
Is there a way in xl2002,vba to list all the files in a
foleder & its subfolders in a tree sort of format so that
its shows names of the file (not the whole location)
Hyperlinked. When user clicks on it it opens up the files.

Thanks for your help
-James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default List Files as HyperLink through VBA

Actually I meant list files & folders as ToC , Table of
content, i.e Folder name & list of all files under it
Hyperlinked
Thanks
-----Original Message-----
Hi

I am not sure if it is poosible, but I'll try to explain.
Is there a way in xl2002,vba to list all the files in a
foleder & its subfolders in a tree sort of format so that
its shows names of the file (not the whole location)
Hyperlinked. When user clicks on it it opens up the files.

Thanks for your help
-James
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default List Files as HyperLink through VBA

Hi
try the following macro:

----
Sub FindFiles()
Dim myPath As String
Dim lLen As Long, i As Long
myPath = "D:\temp" 'change to your needs
With Application.FileSearch
.NewSearch
.LookIn = myPath
.SearchSubFolders = True
.filename = "*.*"
.FileType = msoFileTypeExcelWorkbooks
If .Execute() 0 Then
For i = 1 To .FoundFiles.Count
Cells(i, 1) = .FoundFiles(i)
Cells(i, 2).FormulaR1C1 = "=Hyperlink(R[0]C[-1])"
Next i
Else
MsgBox "There were no files found."
End If
End With
End Sub
---

this will insert the filename in column A and the hyperlink in column B


--
Regards
Frank Kabel
Frankfurt, Germany

James wrote:
Hi

I am not sure if it is poosible, but I'll try to explain.
Is there a way in xl2002,vba to list all the files in a
foleder & its subfolders in a tree sort of format so that
its shows names of the file (not the whole location)
Hyperlinked. When user clicks on it it opens up the files.

Thanks for your help
-James


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default List Files as HyperLink through VBA

James,

My Excel add-in "List Files" should do what you want.
It finds files on your computer meeting criteria you
specify. It generates a list on a new worksheet
showing file location, name, type ,size and
last save date. A hyperlink is created for each file.
It comes with a one page Word.doc install/use file.

It is available - free - upon direct request.
Remove "xxx" from my email address.

Regards,
Jim Cone
San Francisco, CA
XX

"James" wrote in message
...
Hi
I am not sure if it is poosible, but I'll try to explain.
Is there a way in xl2002,vba to list all the files in a
foleder & its subfolders in a tree sort of format so that
its shows names of the file (not the whole location)
Hyperlinked. When user clicks on it it opens up the files.
Thanks for your help
-James



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
Hyperlink PDF Files bksnyder2 Excel Discussion (Misc queries) 0 June 3rd 08 01:44 PM
hyperlink to files? [email protected] Excel Discussion (Misc queries) 4 June 22nd 07 08:56 PM
Look up actual files from a list in excel and enter as a hyperlink AlistairM Excel Discussion (Misc queries) 0 January 23rd 06 10:36 AM
hyperlink to jpg files wines4u Excel Discussion (Misc queries) 6 January 14th 05 12:31 AM
adding Tiff files to the list of image files ksel[_2_] Excel Programming 0 January 23rd 04 09:22 PM


All times are GMT +1. The time now is 08:26 AM.

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"