Advertisement
Guest User

Untitled

a guest
Oct 24th, 2016
396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Sub Splitbook()
  2. MyPath = ThisWorkbook.Path
  3. For Each sht In ThisWorkbook.Sheets
  4. sht.Copy
  5. ActiveSheet.Cells.Copy
  6. ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues
  7. ActiveSheet.Cells.PasteSpecial Paste:=xlPasteFormats
  8. ActiveWorkbook.SaveAs _
  9. Filename:=MyPath & “\” & sht.Name & “.xls”
  10. ActiveWorkbook.Close savechanges:=False
  11. Next sht
  12. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement