excel - Check If Any ListObjects Exist in Worksheet -


if looping through sheets , want test if listobjects exist in given sheet, how do this? tried this:

dim daysoftheweek worksheet each daysoftheweek in sheets if not daysoftheweek.listobjects nothing 'do here - if sheet contains list object end if next 

but if conditional block still ran when sheet did not contain listobject.

worksheet.listobjects collection isn't nothing. paul bica commented, want count how many objects in collection. try this:

dim daysoftheweek worksheet  each daysoftheweek in sheets     if daysoftheweek.listobjects.count > 0         'do here - if sheet contains list object     end if next 

Comments