I have this code which is working fine coping from one workbook to another, but on the sheet where the data is posted I want to hide or delete cells D9:D67 & F9:F67.
I recorded some code to alter my original code but it also hides the data on the sheet where the data is copied from, any ideas how to fix this?
This is what I had
Code
Sub Copy()
Dim RngCopy As Range
Dim RngPaste As Range
Set RngCopy = Workbooks("Parts.xls").Sheets("Spare Parts").Range("A1:H67")
Set RngPaste = Workbooks("Parts Email.xls").Sheets("Spare Parts").Range("A1:H67")
End Sub
This is what I changed it to
Code
Sub Copy()
Dim RngCopy As Range
Dim RngPaste As Range
Set RngCopy = Workbooks("Parts.xls").Sheets("Spare Parts").Range("A1:H67")
Set RngPaste = Workbooks("Parts Email.xls").Sheets("Spare Parts").Range("A1:H67")
RngCopy.Copy RngPaste
Range("D9:D67").Select
Selection.Font.ColorIndex = 2
Range("I9:I67").Select
Selection.Font.ColorIndex = 2
End Sub
Display More