I am creating a wiring diagram generator that toggles the visibility of 100+ layers. I would like to reduce the file size when saving so I wanted to use a function that would delete all visible layers when exporting. I have created an automated macros that duplicates the page, renames the tab based on options on userform and then returns to original page to generate another. I would like to delete invisible layers on duplicated page before returning to main page. Any tips to point me in the right direction?