Q
Qaspec
No luck answering this one myself.
I'd like to send the active worksheet plus a copy of another worksheet in my
workbook.
here is my code I tried but Iget subscript out of range
Private Sub Send1_Click()
Dim strDate As String
ActiveSheet.Copy
Worksheets("Main").Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format (Time, "h-mm-ss")
ActiveWorkbook.SaveAs "NewEmployeeData.xls"
ActiveWorkbook.SendMail "", _
"Employee Attendance Data"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub
Thanx
I'd like to send the active worksheet plus a copy of another worksheet in my
workbook.
here is my code I tried but Iget subscript out of range
Private Sub Send1_Click()
Dim strDate As String
ActiveSheet.Copy
Worksheets("Main").Copy
strDate = Format(Date, "dd-mm-yy") & " " & Format (Time, "h-mm-ss")
ActiveWorkbook.SaveAs "NewEmployeeData.xls"
ActiveWorkbook.SendMail "", _
"Employee Attendance Data"
ActiveWorkbook.ChangeFileAccess xlReadOnly
Kill ActiveWorkbook.FullName
ActiveWorkbook.Close False
End Sub
Thanx