bloodmilksky
Board Regular
- Joined
- Feb 3, 2016
- Messages
- 202
Hi Guys,
I am trying to automate the emailing of a Range using the below, but I am getting a Run Time Error 438.
can anyone help.
I am trying to automate the emailing of a Range using the below, but I am getting a Run Time Error 438.
can anyone help.
Code:
Sub EMAIL_Mail_Test() With Sheets("Sheet1")
.Range("E2").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E4").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E5").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E6").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E7").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E8").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E9").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E10").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E11").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E12").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E13").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E14").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E15").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E16").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E17").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E18").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E19").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E20").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E21").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
Mail_Range.Mail_Range
.Range("E22").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E23").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E24").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E25").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E26").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E27").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E28").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E29").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E30").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E31").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E32").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E33").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E34").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E35").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E36").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E37").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E38").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E39").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E40").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E41").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E42").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E43").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E44").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E45").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E46").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E47").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E48").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E49").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E50").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E51").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E52").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E53").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E54").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E55").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E56").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E57").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E58").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E59").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E60").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E61").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E62").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E63").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E64").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E65").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E66").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E67").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E68").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E69").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E70").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E71").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E72").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E73").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E74").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E75").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E76").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E77").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E78").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E79").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E80").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E81").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E82").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E83").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E84").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
.Range("E85").CopySheets("Sheet2").Range ("B7")
Mail_Range.Mail_Range
MsgBox ("All Done")
End With
End Sub