Selection.Insert Shift:=xlDown
This piece of code is driving me nuts! All I need to do is insert my copied rows onto a new spreadsheet, but it keeps getting hung up on the above code. Here's what I don't understand: I'm using this EXACT code in another workbook and it works flawlessly. My code in full is as follows:
Sub ContractorsTab()
'
' ContractorsTab Macro
' Adds selected rows to 2012 Sent Invoice Summary Sheet
'
'
Selection.Copy
Workbooks.Open Filename:="X:\OSC DETAIL\Invoices Sent to AP\Sent Invoice Summary - 2012.xlsx"
Windows("Sent Invoice Summary - 2012.xlsx").Activate
Sheets("Contractors").Select
Rows("4:4").Select
Selection.Insert Shift:=xlDown
ActiveWorkbook.Close SaveChanges = False
Windows("OS Invoices 07-15.xlsm").Activate
End Sub
All I'm trying to do is put this code into another workbook. My new workbook name is OS Invoices.xlsm, which, in the last line above, I have changed on the new workbook. Anyone have any ideas on why
Selection.Insert Shift:=xlDown
isn't working on the new book? I'm about to go postal here
It just doesn't make sense, it works in one workbook but not the other? WHY!?
Bookmarks