LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default Print all Sheet2 of all Workbooks in Folder

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy data from sheet2 to sheet1 when sheet2 has variable # of rows Anne Excel Discussion (Misc queries) 6 February 27th 09 09:48 PM
macro to print sheet2 without open sheet2 ramzi Excel Discussion (Misc queries) 1 January 28th 09 12:07 PM
Update workbooks in folder, new name and save in new folder [email protected] Excel Programming 4 June 20th 08 09:39 AM
For Each workbook in Folder A Copy Values & Format of each Sheet2... u473 Excel Programming 9 May 30th 08 01:45 AM
For all workbooks in a folder Ctech[_89_] Excel Programming 3 January 31st 06 04:14 PM


All times are GMT +1. The time now is 10:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"