Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I found this cool macro on this group that makes a list of all files in a folder. With each file name in a separate row. I would be very grateful if any one can make suitable changes so that each row contains a hyper link to the file. TIA Unni Sub ListIndexFiles() 'Lists all file names in the folder on the active sheet Dim FileName As String Dim r As Integer 'Range("a2:a5").ClearContents r = 2 With Application.FileSearch .NewSearch .LookIn = "C:\Documents and Settings\Administrator\My Documents" .FileName = "*.doc" If .Execute() 0 Then For i = 1 To .FoundFiles.Count FileName = Mid(.FoundFiles(i), 18) Cells(r, 1) = FileName r = r + 1 Next i End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can you help me to improve this macro? | Excel Programming | |||
Improve code | Excel Programming | |||
Improve code | Excel Programming | |||
Need to improve a formula | Excel Worksheet Functions | |||
Please help me improve macro to convert spreadsheet to tabular for | Excel Programming |