File search has been removed after 2003 Version..you may use Dir() for same task..
On Fri, Mar 25, 2011 at 2:34 AM, Dave <davidstev...@gmail.com> wrote: > Hi Gurus,, > > I have the following macro that has been working fine for ages in > Excel 2003 and now is giving me "run time error 445 Object doesn't > support this action" in Excel 2010. I need help in fixing this macro > please. I have read about the "dir" method & "Application.FileSearch" > methods but it does not help as I am not a programmer. Thanks in advance. > > Sub all_2010_pdf() > Dim i As Long > With Application.FileSearch > .NewSearch > .SearchSubFolders = True > .Filename = "*.pdf" > .LookIn = "\c:\temp\vba" > .Execute > For i = 1 To .FoundFiles.Count > ActiveSheet.Hyperlinks.Add Anchor:=Range("A" & i), _ > Address:=.FoundFiles(i), TextToDisplay:= _ > Right(.FoundFiles(i), Len(.FoundFiles(i)) - _ > InStrRev(.FoundFiles(i), "\")) > Next > End With > End Sub > > -- > > ---------------------------------------------------------------------------------- > Some important links for excel users: > 1. Follow us on TWITTER for tips tricks and links : > http://twitter.com/exceldailytip > 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 > 3. Excel tutorials at http://www.excel-macros.blogspot.com > 4. Learn VBA Macros at http://www.quickvba.blogspot.com > 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com > > To post to this group, send email to excel-macros@googlegroups.com > > <><><><><><><><><><><><><><><><><><><><><><> > Like our page on facebook , Just follow below link > http://www.facebook.com/discussexcel > > -- Regards Rajan verma +91 9158998701 -- ---------------------------------------------------------------------------------- Some important links for excel users: 1. Follow us on TWITTER for tips tricks and links : http://twitter.com/exceldailytip 2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310 3. Excel tutorials at http://www.excel-macros.blogspot.com 4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and Tricks at http://exceldailytip.blogspot.com To post to this group, send email to excel-macros@googlegroups.com <><><><><><><><><><><><><><><><><><><><><><> Like our page on facebook , Just follow below link http://www.facebook.com/discussexcel