Hi All,

Hoping you can help me, I have a workbook in which I would like to send two worksheets as a workbook via outlook.

I have tried messing around with some code I have found on the forums but Im no expert at VB.

The two Sheets I want to send are named "Customer Timesheet" and "Employee Timesheet"

The email address and title of the excel workbook is to be pulled from another sheet called "Payroll Data"

Please see an Example of the code I have been playing with below

Sub Mail_Sheets()

    Dim strName As String
    'sheets to copy
    Worksheets(Array("Customer Timesheet", "Employee Timesheet")).Copy
    'Range to get workbook title
    strName = Sheets("Payroll Data").Range("A36" & " " & "B36" & " " & "C36")
    ActiveWorkbook.SaveAs "strName" & ".xls"
    'I want it to get the email from "Sheets("Payroll Data").Range("C37")
    ActiveWorkbook.SendMail "12345@ofsl.ie"
    ActiveWorkbook.ChangeFileAccess xlReadOnly
    Kill ActiveWorkbook.FullName
    ActiveWorkbook.Close False
End Sub
I dont know if i am even close with this code, Any help greatly appreciated.

Regards,
Simon