Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Add a cc to this code
How can I add a cc ... the line will be standard so I can add it as an "And"
.... but I don't know how to do this: I want to cc this to an address such as every time I run this. ------------------------- Sub Mail_every_Worksheet() Dim sh As Worksheet Dim WB As Workbook Dim strdate As String Application.ScreenUpdating = False For Each sh In ActiveWorkbook.Worksheets If sh.Range("a2").Value Like "*@*" Then strdate = Format(Now, "dd-mm-yy h-mm-ss") sh.Copy Set WB = ActiveWorkbook With WB .SaveAs "Sheet " & sh.name & " of " _ & ActiveWorkbook.name & " " & strdate & ".xls" .SendMail ActiveSheet.Range("a2").Value, _ "SCSU Referrals" .ChangeFileAccess xlReadOnly Kill .FullName .Close False End With End If Next sh Application.ScreenUpdating = True End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
split post code (zip code) out of cell that includes full address | Excel Discussion (Misc queries) | |||
Code to conditional format all black after date specified in code? | Excel Discussion (Misc queries) | |||
Drop Down/List w/Code and Definition, only code entered when selec | Excel Worksheet Functions | |||
Convert a Number Code to a Text Code | Excel Discussion (Misc queries) | |||
VBA code delete code but ask for password and unlock VBA protection | Excel Programming |