I've got a workbook that I use to create other workbooks, it basically saves as a new workbook and saves it to a directory and with a file name based on information entered into the workbook. It also deletes two buttons I put in that have other macros linked to in order to prevent them being accidentally run again these being Rounded Rectangle 1 and Rounded Rectangle 2
This was my code
This worked fine but I needed to change two things.![]()
Please Login or Register to view this content.
1. I didn't want the workbook that generates the other workbooks to be saved. Instead it should be closed without saving (this is because I have another macro that runs whenever the workbook is saved).
2. If a cell, B1, in the generator workbook was blank, I didn't want it to create the new workbook.
So I changed the code to this:
What happens now is the generator workbook isn't saved, which is correct, and if B1 is empty it won't save it as a new workbook which is also correct. However when B1 has data in it, it does create the new workbook but the buttons, rounded rectangle 1 & 2 are not deleted.![]()
Please Login or Register to view this content.
I can't work out what I've done that means that everything works as it should but the buttons aren't deleted.
Bookmarks