Hi,
I have to code below which works but there are two things that I need it to do.
1. at the point of paste don't ask if I was to clear the clipboard
2. completely close the Email_Report after its finished
I have to code below which works but there are two things that I need it to do.
1. at the point of paste don't ask if I was to clear the clipboard
2. completely close the Email_Report after its finished
Code:
Sub copy()
Sheets("DATA").Select
Dim wb1 As Workbook
Dim wb2 As Workbook
Set wb1 = Workbooks("Email Tool.xlsm")
Dim objApp As Excel.Application
Set objApp = CreateObject("Excel.Application")
objApp.Visible = True
Set wb2 = objApp.Workbooks.Open("H:\Online\Email\Reporting\Email_Report.xls")
wb2.Sheets("email_report").Range("C:M").copy
wb1.Sheets("DATA").Range("A1").Select
wb1.Sheets("DATA").Paste
Application.CutCopyMode = False
Range("A1:K9").Select
Selection.Delete Shift:=xlUp
wb2.Close SaveChanges:=False
Set wb2 = Nothing
Set objApp = Nothing