Hi all. Thanks in advance.
Have a workbook with approximately 25 worksheets in it.
I want to copy/paste/value each worksheet and save it as it's own workbook.
My code doesn't work, it hangs up on ws.copy every single time, on Excel 2007 and prior versions.
Does anyone have working code for something like this?
FYI, my current code is : - I had posted in another thread, but the title was misleading!
Sub SaveWS()
Dim wb As Workbook
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Copy
Set wb = ActiveWorkbook
wb.SaveAs "t:\dir1\expenses\" & ws.Name & ".xls"
wb.Close False
Next ws
End Sub
Have a workbook with approximately 25 worksheets in it.
I want to copy/paste/value each worksheet and save it as it's own workbook.
My code doesn't work, it hangs up on ws.copy every single time, on Excel 2007 and prior versions.
Does anyone have working code for something like this?
FYI, my current code is : - I had posted in another thread, but the title was misleading!
Sub SaveWS()
Dim wb As Workbook
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
ws.Copy
Set wb = ActiveWorkbook
wb.SaveAs "t:\dir1\expenses\" & ws.Name & ".xls"
wb.Close False
Next ws
End Sub