Hi, see the attached File,, it meets the operational requirement
On Fri, Apr 15, 2011 at 10:17 PM, rajan verma <rajanverma1...@gmail.com>wrote: > see if it help > > Rajan > > > On Fri, Apr 15, 2011 at 9:32 PM, ashish koul <koul.ash...@gmail.com>wrote: > >> >> >> ---------- Forwarded message ---------- >> From: David Stevans <davidstev...@gmail.com> >> Date: Fri, Apr 15, 2011 at 6:37 PM >> Subject: Macro Help again >> To: ashish koul <koul.ash...@gmail.com> >> >> >> Hi, >> >> How are you I need some more help with the macr you gave me a couple of >> weeks ago. >> >> This macro works great I need to modify it some. I want the macro to >> be able to search the directory based on answers prompted from the >> user. If the user does not provide the answer than I want it to run >> the search based on the value entered upto the last question the user >> answered. So if the user only entered the year as 2010 I want the >> macro to search all sub-directories and display the PDF files below >> the year 2010 folder. If they enter the year and the month then I want >> the macro to search the sub directory for the month and year combo. >> Ann so on >> The directory structure on the drive is as follows: >> Year >> Month >> Day >> >> I want the macro to prompt the user for: >> Please Select Year (4 digit year like 2010, 2011...) >> Please Select Month ( 3 character like Jan , Feb, Mar,Jun.....) >> Please Select Day ( Numeric 1 to 30) >> *The macro is:* >> ** >> ** >> Public f As Object, d As Object, i As Long >> Sub Mcfile_10() >> Dim Fso As Object >> Set Fso = CreateObject("Scripting.FileSystemObject") >> 'RootFolder is the main folder >> Set RootFolder = Fso.getfolder("\\fileserver\Scans\") >> FolderRead RootFolder >> End Sub >> Sub FolderRead(ByRef myFolder) >> 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 >> End If >> Next f >> For Each d In myFolder.SubFolders >> FolderRead d >> Next d >> End Sub >> >> >> >> -- >> *Regards* >> * * >> *Ashish Koul* >> *akoul*.*blogspot*.com <http://akoul.blogspot.com/> >> *akoul*.wordpress.com <http://akoul.wordpress.com/> >> My Linkedin Profile <http://in.linkedin.com/pub/ashish-koul/10/400/830> >> >> >> P Before printing, think about the environment. >> >> >> > > > -- > Regards > Rajan verma > +91 9158998701 > -- 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
Search.xlsm
Description: Binary data