Testing Closed Files

  • Thread starter Thread starter Paul W Smith
  • Start date Start date
P

Paul W Smith

I have a number of XL workbooks in a directory. I want to loop through
every workbook, checking if that workbook contains as wks called 'NEW' and
if it does, collect data from this worksheet. I have written code that
achieves this, but I do this by opening every WB to test if the 'NEW'
worksheet exists. This is very time consuming as every file has to be
opened and closed.

Is it possible, through code, to test for the existence of a worksheet
within a closed workbook. If it does test whether it is visible or hidden
WITHOUT opening the workbook?

Paul Smith
 
Paul

I don't think that's possible. You might consider setting
Application.Calculation, Application.ScreenUpdating to False to speed up
what you already have.
 
Back
Top