L
Legacy 51064
Guest
I am trying to copy some data from workbook1 to workbook2, but I am getting an Alert. The data in workbook1 is linked to other workbooks and the alert is asking me if I want to update workbook2. I do not want to update the information. How do I get rid of that alert?
Thank you
Sub Macro2()
'Deactivates the alerts and screen updates
Application.DisplayAlerts = False
'Creates the Comm reversal
InvoiceID = Sheets("Commissions").Range("L6").Value
Workbooks.Open Filename:= _
"C:\My Documents\Work\Journal Entries\" & InvoiceID
Sheets("JE").Range("A13:F" & Cells(Rows.Count, "O").End(xlUp).Row).Copy
Workbooks("workbook2.xls").Sheets("Commissions").Range("A13").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.Close
End Sub
Thank you
Sub Macro2()
'Deactivates the alerts and screen updates
Application.DisplayAlerts = False
'Creates the Comm reversal
InvoiceID = Sheets("Commissions").Range("L6").Value
Workbooks.Open Filename:= _
"C:\My Documents\Work\Journal Entries\" & InvoiceID
Sheets("JE").Range("A13:F" & Cells(Rows.Count, "O").End(xlUp).Row).Copy
Workbooks("workbook2.xls").Sheets("Commissions").Range("A13").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveWindow.Close
End Sub