- Ustvarite nov delovni zvezek z SheetsArray.
- Delovni zvezek shranite, preden ga pošljete po pošti.
- Po pošiljanju izbrišite datoteko s trdega diska.
Sub Mail_SheetsArray () Zatemni strDate kot nizove listov (niz ("Sheet1", "Sheet3")). Kopiraj strDate = Format (Date, "dd-mm-yy") & "" & Format (Time, "h-mm- ss ") ActiveWorkbook.SaveAs" Del "& ThisWorkbook.Name _ &" "& strDate &" .xls "ActiveWorkbook.SendMail" [email protected] ", _" To je vrstica Zadeva "ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook .FullName ActiveWorkbook.Zaprite False End Sub