Hi guys, I have code to replace some columns in a specific worksheet. I want to apply this to all workbooks in a folder:
So open > paste values > save > close ...next... workbook open > paste values > save > close ... and so on. All Workbooks have the same Worksheet name that it goes into and pastes to: "Atts".
Thanks!!
So open > paste values > save > close ...next... workbook open > paste values > save > close ... and so on. All Workbooks have the same Worksheet name that it goes into and pastes to: "Atts".
Code:
[/COLOR][COLOR=#333333]Sub Replace()[/COLOR]
<code style="margin: 0px; padding: 0px; font-style: inherit; font-weight: inherit;"> Workbooks.Open Filename:= _
"K:\Drive\Path\Sum Stat\File.xlsm"
Application.AskToUpdateLinks = False
Windows("Atts Final.xlsm").Activate
Columns("J:K").Select
Selection.Copy
Windows("File.xlsm").Activate
Sheets("Atts").Select
Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
ActiveWorkbook.Save
ActiveWindow.Close </code>[COLOR=#333333]End Sub[/COLOR][COLOR=#333333]
Thanks!!