below is the code





Dim ownf, raws, cc, cno As String
Sub findd()
Application.DisplayAlerts = False
Application.ScreenUpdating = False
    Dim i As Integer
    ownf = ActiveWorkbook.Name
    'cno = Range("b2").Value
    'cc = Range("b3").Value
    With Application.FileSearch
        .LookIn = Range("b1").Value
        '* represents wildcard characters
        .Filename = "*.xls" 'change it as per file type
    If .Execute > 0 Then 'Workbook exists
        For i = 1 To .FoundFiles.Count

        Application.StatusBar = "Number of File Opened - " & i
             Workbooks.Open (.FoundFiles(i))

Call tt

            Next i

    End If
End With
Sheets("details").Select
MsgBox ("Files combined..."), vbInformation, "Done"
        Application.StatusBar = False

End Sub
Sub tt()
            raws = ActiveWorkbook.Name
            Sheets(1).Select
            Range("a2", Range("a65000").End(xlUp)).EntireRow.Select
            'ActiveCell.EntireRow.Select
            Selection.Copy
            Workbooks(ownf).Activate
            Sheets("master").Select
            Range("a65000").End(xlUp).Offset(1, 0).PasteSpecial
xlPasteValues
            'Range("a65000").End(xlUp).Offset(0, 8).Value =
Workbooks(raws).FullName
            Workbooks(raws).Activate



            Application.CutCopyMode = False
            'ActiveCell.Offset(1, 0).Select
            'Next i
            Workbooks(raws).Close False

End Sub











On Fri, May 8, 2009 at 8:36 AM, manish aswal <meetas...@yahoo.com> wrote:

>
>
>
> > Hi All
> >
> > UR help required.
> > I m vry new to use macro (using VBA). I am handling a team
> > of around 60 Members and at the day end i have to
> > consolidate their daily productivity files (having same
> > format for all).
> >
> > Now i want a macro to consolidate all these files (for a
> > current date). Sample files (it would be around 40 - 45)
> > attached herewith to which i have to consolidate (datewise).
> >
> >
> > Expecting your quick and kind response...
> >
> > Thanks
> > Manish Aswal
>
>
>
> >
>


-- 
Thanks & Regards,

Harmeet Singh

--~--~---------~--~----~------------~-------~--~----~
-------------------------------------------------------------------------------------
Some important links for excel users:
1. Excel and VBA Tutorials(Video and Text), Free add-ins downloads at 
http://www.excelitems.com
2. Excel tutorials at http://www.excel-macros.blogspot.com
3. Learn VBA Macros at http://www.vbamacros.blogspot.com
4. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 

To post to this group, send email to excel-macros@googlegroups.com
If you find any spam message in the group, please send an email to:
Ayush Jain  @ jainayus...@gmail.com or
Ashish Jain @ 26may.1...@gmail.com
-------------------------------------------------------------------------------------
-~----------~----~----~----~------~----~------~--~---

Reply via email to