There are a two email contacts that get this report. One is static and the other changes depedning on the outcome. I am trying to reference cell 'Master Appraisal'!F1 to send the report to the email contact which can change.
Any help would be appreciated...
Any help would be appreciated...
Code:
Sub Mail_workbook_1()
Dim wb As Workbook
Set wb = ActiveWorkbook
If Val(Application.Version) >= 12 Then
If wb.FileFormat = 51 And wb.HasVBProject = True Then
MsgBox "There is VBA code in this xlsx file, there will" & vbNewLine & _
"be no VBA code in the file you send. Save the" & vbNewLine & _
"file first as xlsm and then try the macro again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
wb.SendMail "drmingle@example.com", _
ActiveWorkbook.Name
wb.SendMail "'Master Appraisal'!F1", _
ActiveWorkbook.Name
On Error GoTo 0
End Sub