N
Neil Holden
Is it possible to clear a range of cells so that it defaults back to template
once the user clicks the button, below is code to attach the excel woorkbook
in an email and once emails i want it to clear certain cells.
Sub Mail_Button66_Click()
'Working in 97-2007
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 be no
VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro
again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
wb.SendMail "", _
"This is the Subject line"
On Error GoTo 0
End Sub
once the user clicks the button, below is code to attach the excel woorkbook
in an email and once emails i want it to clear certain cells.
Sub Mail_Button66_Click()
'Working in 97-2007
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 be no
VBA code in the file you send." & vbNewLine & _
"Save the file first as xlsm and then try the macro
again.", vbInformation
Exit Sub
End If
End If
On Error Resume Next
wb.SendMail "", _
"This is the Subject line"
On Error GoTo 0
End Sub