Hi, I have the following code which searches a folder and than displays all the .PDF files as hyperlinks in the body of the Excel spreadhsheet. I want to modify it so that it can display .TIF files also. Can you please look at the code below and see if this can be done. All help is appreciated.
Private Sub FolderRead(ByRef myFolder) Dim countf As String countf = 0 For Each f In myFolder.Files Var = f.Path If Right(f.Name, 4) = ".pdf" Then i = i + 1 ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & i), _ Address:=f.Path, TextToDisplay:=f.Name & " " & f Range("I" & i) = f.Name 'mer added Range("J" & i) = rootfolder & "\" 'mer added countf = countf + 1 End If Next f Range("E1") = "# Of Documents is: " & countf countf = 0 End Sub -- FORUM RULES (986+ members already BANNED for violation) 1) Use concise, accurate thread titles. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get quick attention or may not be answered. 2) Don't post a question in the thread of another member. 3) Don't post questions regarding breaking or bypassing any security measure. 4) Acknowledge the responses you receive, good or bad. 5) Cross-promotion of, or links to, forums competitive to this forum in signatures are prohibited. NOTE : Don't ever post personal or confidential data in a workbook. Forum owners and members are not responsible for any loss. ------------------------------------------------------------------------------------------------------ To post to this group, send email to excel-macros@googlegroups.com