I have a workbook with several worksheets and a macro. The macro,
among other things, emails itself to people. Because I don't want to
email a spreadsheet with a macro attached, it creats a copy of
itself, emails that copy, and finally deletes that copy. The
problem is when the receipient opens the emailed spreadsheet, they
get a linking error because some of the spreadsheets contain graphs,
and those graphs are still linking back to the original spreadsheet
as the data source. Is there a way around this, or should I stop
wasting my time?
Code to email workbook:
Private Sub emailSpreadsheet()
ActiveWorkbook.Worksheets.Copy
ActiveWorkbook.SaveAs ThisWorkbook.Name & " Email version"
ActiveWorkbook.SendMail "xxxxxxx@...", _
"Testing"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub