I just opened the Visual Basic Editor for an .xls file that I’m supposed to be doing some automation for…
The Project Explorer lists over 100 standard modules (Don’t ask me how they got there!), and there are only 4 or 5 with code in them… I really don’t want to leave them there, and I don’t want to delete them all one at a time…
Is there a way (by code) to loop through the Standard Modules for this workbook, check to see if there is any code in it, and if it’s empty, delete the module?
They are all named “Module1”, “Module45”, etc…