Pivot tables, Validation Lists exist in an excel file

S

Shimmy

I have a directory tree containing several hundred excel
files. I am going to batch print these "as is". However I
want to know which of these contains pivot tables or
validation lists that all the possible data will not have
shown during the print process.

Does anyone know of a programatic way to cycle through and
check if a pivot table, validation list or other object
exists within a file, then move on to the next?
 
T

Tom Ogilvy

open the file, loop through the pages, check sh.PivotTables.count, check
for list style validation

On Error Resume Next
set rng = sh.Cells.SpecialCells(xlCellTypeAllValidation)
On Error goto 0
for each cell in rng
if cell.Validation.Type = xlValidateList then
bValidation = True
exit for
end if
Next
 
Top