hansgrandia
Board Regular
- Joined
- Jan 10, 2015
- Messages
- 53
Hi,
I'm attempting to copy from one file to another. Successfully. Next step is to bring (paste) it to the correct position within the file. That's failing in the last row of this code.
What could solve this issue? Support is appreciated! Thanks Hans (Netherlands).
I'm attempting to copy from one file to another. Successfully. Next step is to bring (paste) it to the correct position within the file. That's failing in the last row of this code.
What could solve this issue? Support is appreciated! Thanks Hans (Netherlands).
Code:
'Transfer to another file
Set wbThis = ActiveWorkbook
strName = ActiveSheet.Name
Set wbTarget = Workbooks.Open("\\vulog.local\dfs\Users\grandh\Desktop\Handy\Warehouse_KPI's_MT_2017.xlsx")
wbTarget.Worksheets("bron").Select
wbTarget.Worksheets("bron").Range("A1:A7").ClearContents
wbThis.Activate
Application.CutCopyMode = False
wbThis.Worksheets("Jobtime").Range("J2:J8").Copy
wbTarget.Worksheets("bron").Range("A1").PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
wbTarget.Worksheets("bron").Activate
Range(Selection, Selection.End(xlDown)).Select
Selection.NumberFormat = "#,##0"
Selection.Copy
Application.CutCopyMode = False
Sheets("input").Activate
Range("A2").Select
Selection.End(xlToRight).Offset(0, 1).Select
[COLOR=#ff0000]ActiveCell.PasteSpecial xlPasteValues[/COLOR]
Last edited: