Kirjaleht, kasutades Microsoft Excelis Array VBA -d

Anonim
  • Looge SheetsArray abil uus töövihik.
  • Salvestage töövihik enne selle saatmist.
  • Pärast saatmist kustutage fail kõvakettalt.
Sub Mail_SheetsArray () Dim strDate String Sheetidena (massiiv ("Sheet1", "Sheet3")). Kopeeri strDate = Format (Date, "dd-mm-yy") & "" & Format (Time, "h-mm- ss ") ActiveWorkbook.SaveAs" Osa "& ThisWorkbook.Name _ &" "& strDate &" .xls "ActiveWorkbook.SendMail" [email protected] ", _" See on teemarea "ActiveWorkbook.ChangeFileAccess xlReadOnly Kill ActiveWorkbook" .FullName ActiveWorkbook.Close False End Sub