I use this code to transfer my data from one workbook toanother:
Windows("IK-periode26.xlsm").Activate
Sheets("Result").Select
Range("B6:G6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("Arbejdsfil v2 - IKS(TESTER).xlsm").Activate
Sheets("Result").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues,Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
What I need is theIK-periode 26 referencing/linking to be dynamic if possible… usually the nextfile have a similiar name (the number in the end usually change as itrepresents week number)
Is it possible to make a linking in the workbook (arbejdsfil v2) to the new workbook filefrom the desktop and then reference the cell with the link or something? Or perhaps make an inputbox which edit the specific string of text in the code thus fitting the name of the new workbook? other options are welcome
Windows("IK-periode26.xlsm").Activate
Sheets("Result").Select
Range("B6:G6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("Arbejdsfil v2 - IKS(TESTER).xlsm").Activate
Sheets("Result").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues,Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
What I need is theIK-periode 26 referencing/linking to be dynamic if possible… usually the nextfile have a similiar name (the number in the end usually change as itrepresents week number)
Is it possible to make a linking in the workbook (arbejdsfil v2) to the new workbook filefrom the desktop and then reference the cell with the link or something? Or perhaps make an inputbox which edit the specific string of text in the code thus fitting the name of the new workbook? other options are welcome