Hi! Thanks so much for stepping in to offer assistance!
Logit ... I commented out the line you pointed out in the CopyModule code. It stopped on this line with the error "Method 'VBProject' of object '_Workbook' failed. This is a new one for me.
Andy, your approach seems simple enough so I gave it a go. I moved the simple lines of code for the shapes into that worksheet's object code. BTW, here is the code for the macro emedded buttons on the worksheet being copied to a new book.
The CopyModule code is eliminated altogether from the emailing code.
However, I run into a problems even before this associated with saving the copied workbook initially. The process of copying the worksheet to a new book is initially created in this module. (This creation is not the one that is emailed. The one emailed is the same worksheet but has some button functionality disabled for the recipient). Refer to this code ...
This code breaks at the line in red when it tries to save. Since the new workbook has vb associuated to it (in the worksheet object) it will not allow it to save with that (.xlsx) extension.
If I change the extension to ".xlsm" in the line in blue ... I get "This extension can not be used with the selected file type. Change the file extension in the File name text box or select a different file type by changing the Save as type." as in breaks at the same line as above in red. It doesn't appear as though I can save the newly created workbook with the vba in the sheet.
Bookmarks