Copy chart to email and send to list based on cell values
Daily-Call-Metrics---By-Campaign_Ne.xlsmI am trying to email a pivot table to a list of email addresses on an excel sheet. I have tried multiple ways to accomplish this but no success. Currently I can create the pivot table as a chart on a new sheet and open a new email. However, the list of email addresses will not appear in the "TO" field and the chart will not copy to the email. I am open to new ways of accomplishing this. Creating a new worksheet with the pivot table converted to a chart was just the only way I could figure out to do it. Ideally I would not have to create a new worksheet that I have to close when done. I will attached the worksheet. Here is what I have so far:
Dim RNG As Range
Set RNG = Range("A1:U26")
Dim sdate As String
Dim FileName As String
Dim SavePath As String
Dim SaveAs As String
You weren't getting any addresses because the addresses weren't copied to the worksheet with the chart. I tweaked the code to avoid that problem.
I also put the code in the workbook rather than Personal.xlsb (and redirected the action item for the button).