
Originally Posted by
nathansav
1 Range.Copy method
2 Workbooks.Add method
3 PasteSpecial method
4 Activeworkbook.SaveAs method
google these or type them in VBA and press F1, should get you started.
Thanks, found some code, I've modified it to what I want, but I'm struggling with the last piece of the puzzle.
VBA - New sheet, Copy paste values, Saves as.xlsm
Atm, the worksheet called "Save info" is copied and saved, I don't want this sheet to be included.
Also the parts of code where 04 2014 is, needs to be linked to cell B1 & B2 in the Save info worksheet
'Create new folder to save the new files in
FolderName = Sourcewb.Path & "\" & "04 2014"
MkDir FolderName
and
'Save the new workbook and close it
With Destwb
.SaveAs FolderName _
& "\" & "04 2014 " & Destwb.Sheets(1).Name & FileExtStr, _
FileFormat:=FileFormatNum
.Close False
End With
Bookmarks