Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This little module crashes on "With Application.FileSearch".
That may not be the real culprit, but I have not found what is wrong. Thank you for your help. .. Sub PrintAllWS2() Dim i As Long Dim WB As Workbook Application.ScreenUpdating = False With Application.FileSearch .NewSearch .LookIn = "F:\VBA845\" .SearchSubFolders = False .FileType = msoFileTypeExcelWorkbooks For i = 1 To .FoundFiles.Count Set WB = Workbooks.Open(.FoundFiles(i)) Sheets("Sheet2").PrintOut WB.Close False Next i End With Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
copy data from sheet2 to sheet1 when sheet2 has variable # of rows | Excel Discussion (Misc queries) | |||
macro to print sheet2 without open sheet2 | Excel Discussion (Misc queries) | |||
Update workbooks in folder, new name and save in new folder | Excel Programming | |||
For Each workbook in Folder A Copy Values & Format of each Sheet2... | Excel Programming | |||
For all workbooks in a folder | Excel Programming |