T
Telecommm
Hi Champs,
I have written the following code:
Sub Mail_ActiveSheet()
Dim strDate As String
ActiveSheet.Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
ActiveSheet.SaveAs " KPI Certificate " & ActiveSheet.Range("D8").Value _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail "(e-mail address removed)", _
"KPI Certificate / North /" &
ActiveSheet.Range("D8").Value
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub
the code generates a new Workbook and copies the current sheet into new
Excel Workbook which is exactly what I want but at the same time it copies my
Macros in new Workbook too. Is it possible that i can set cell range to be
copied to the new workbook and then Saveas this sheet for email purpose.
Secondly, can I send new work book to more than one person.
I wish you all Happy Xmas and Thank you so much for the kind help.
I have written the following code:
Sub Mail_ActiveSheet()
Dim strDate As String
ActiveSheet.Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format(Time, "h-mm-ss")
ActiveSheet.SaveAs " KPI Certificate " & ActiveSheet.Range("D8").Value _
& " " & strDate & ".xls"
ActiveWorkbook.SendMail "(e-mail address removed)", _
"KPI Certificate / North /" &
ActiveSheet.Range("D8").Value
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub
the code generates a new Workbook and copies the current sheet into new
Excel Workbook which is exactly what I want but at the same time it copies my
Macros in new Workbook too. Is it possible that i can set cell range to be
copied to the new workbook and then Saveas this sheet for email purpose.
Secondly, can I send new work book to more than one person.
I wish you all Happy Xmas and Thank you so much for the kind help.