I posted about this a while ago and i thought i'd worked around the issue but i haven't.
Wasn't sure whether i was meant to revive the old thread or start a new one, sorry if i've done the wrong thing!
This time i'm attaching a workbook - i've sanitised and simplified it.
There is a control button on the "Instructions" tab that calls the macro delete_sheets. It should delete each sheet after the user defined administrative sheets.
I have a couple of UDFs which calculate on the "Instructions" tab but the code is in their own module. The UDFs use the sheets.count calculation.
When i click the "Delete All Scripts" button (in the attached i would expect it to delete two sheets BP 2 and BP 3). Excel Crashes completely.
I'm sure the conflict is between having a UDF that counts sheets and command that deletes them but i'm stumped as to what a work around is. Any takers?
Thanks,
J
Bookmarks