Hi All,
I have a sheet I am using as a user form that on a button press creates an email with a PDF of the sheet attached to it. During the execution of the macro several rows are hidden and unhidden to set the sheet up for the recipient of the email and then to set the sheet in a 'sent' state for the sender. I deliberately used hide/unhide rows due to the worksheet change event that interferes with the protected state of the sheet.
When the SendButton macro (code attached to sheet1) is called from the send button everything runs perfectly up to the error message 400 with no other explanation. When I step through the the SendButton macro to debug, the error occurs at line 303 - Run-time error '1004': Application-defined or object-defined error.
Line 303:
I have no idea why as the worksheet is still in a an unlocked state when the error occurs and works for the previous two hide/unhide row actions. I just cant see why this line should give an error. I've attached the sheet. I'm wondering if I missed something or if this is a glitch with excel 2013.
Any help is greatly appreciated!
Thanks,
Bookmarks