Hi all,
I have created a macro that generates emails with attachments. It works wonderfully attaching it to a button. BUT, I have about 300 rows in my original workbook, and initially I thought I would have to set 300 buttons per row and attach 300 different macros to them to active.
What I'm wanting to do, is have one button, that dynamically selects the information for the cell that I am in. So if I click the button then click H6, it selects the info for my .to, .cc etc from row 6. Or backward clicking into the cell first then pressing the button perhaps?
So, my code is as below you'll see I have the email set to take the .to from A6, .cc from C6, part of the .subject from G6 and the .attachments name from H6. This would then change to A7, C7, G7, H7 etc etc. Each row is different depending on whether there is a 1 or blank in P:BL in my workbook.
I have attached an example workbook.
Thanks in advance wonderful people!
Bookmarks