Need help with code to copy cells(range/whole sheet) from second workbook.
Macro is used inside 094-0.....macro.xlsm file and I need to copy first sheet (or range A1:T10 at least) from second file to last sheet from fist file. Then close the second file without saving changes.
I have problem with activation of wokrbook and paste data.
Dim wbk As Workbook
Sheets.Add(after:=Sheets(Sheets.Count)).name = artikl & "_SK" & i 'it's OK
strSecondFile = "C:\…..\template_2003_XML.xml"
strFirstFile = "C:\…..\094-022605-00001_w_macro.xlsm"
Set wbk = Workbooks.Open(strSecondFile)
Range("A1:T350").Copy
Set wbk = Workbooks("094-022605-00001_w_macro").Activate
With wbk.Sheets(sheets.Count)
Range("A1").PasteSpecial Paste:=xlPasteAll, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
End With
Workbooks("template_2003_XML.xml").Close savechanges:=False