Hi guys. I was wondering if anyone could help me out with a problem I am having. I'm not even sure if it's possible to do this but here's my situation:

I have an existing Excel workbook with VBA code attached to the spreadsheets in it. I also have a button on the spreadsheet that when clicked generates an entirely new workbook file.

What I was wondering is if it is possible to copy the VBA code that is in the existing workbook file into the newly generated workbook file that is generated when the button is clicked? Basically when the button is clicked, I want the new workbook file to be created and have it automatically contain the code from the previous workbook. Is this even possible? I appreciate any help I can get. Thanks.