I know this is a much explored topic, but in the code below most everything works fine (courtesy of Legare, for the most part). The only thing that does not seem to work is when the emailed sheet is opened, it asks for the sheet which contains the information to which it is linked. Is there any way to disable the link update?
I tried the .range.pastespecial approach through two cycles to get the values and the formats for each run but the column spacing comes out different.
Here is what I am running:
Sub MailActiveSheet() Dim strPath As String Dim oBook As Workbook Dim oSheet As Worksheet resp = MsgBox("This will email the active sheet (the one you are looking at) as _ an attachment. Proceed?", vbOKCancel, "Email the active sheet?") If resp = vbCancel Then End Application.ScreenUpdating = False strSheet = ThisWorkbook.ActiveSheet.Name Application.SheetsInNewWorkbook = 1 strPath = ActiveWorkbook.Path If Right(strPath, 1) "" Then strPath = strPath & "" End If Application.ScreenUpdating = False Set oSheet = ActiveSheet oSheet.Cells.Copy Set oBook = Workbooks.Add oBook.Worksheets(1).Name = strSheet oBook.Activate oBook.Worksheets(1).Paste Destination:=oBook.Worksheets(1).Range("A1") oBook.UpdateRemoteReferences = False Application.DisplayAlerts = False oBook.SaveAs Filename:=strPath & strSheet Application.DisplayAlerts = False Application.ScreenUpdating = True ActiveWorkbook.SendMail Recipients:="" ActiveWorkbook.Close savechanges = False Application.SheetsInNewWorkbook = 3 End Sub