ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Save sheet? (https://www.excelbanter.com/excel-worksheet-functions/16796-save-sheet.html)

Heine

Save sheet?
 
How can i save 200 sheets in an excel file as 200 excel file with name of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.

Bob Phillips

Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with name of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.




Ron de Bruin

Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message ...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with name of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.






Bob Phillips

Easily fixed

Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Activeworkbook.Close
Next i
End With

End Sub



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron de Bruin" wrote in message
...
Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message

...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with name

of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.








Ron de Bruin

Hi Bob

Easily fixed

I know<g


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message ...
Easily fixed

Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Activeworkbook.Close
Next i
End With

End Sub



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron de Bruin" wrote in message
...
Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message

...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with name

of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.









Bob Phillips

Hi Ron,

I know you know. I read your page :-)

Bob


"Ron de Bruin" wrote in message
...
Hi Bob

Easily fixed

I know<g


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message

...
Easily fixed

Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Activeworkbook.Close
Next i
End With

End Sub



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron de Bruin" wrote in message
...
Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message

...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name &

".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with

name
of
sheet as file name. Due to the number of sheets it is needed to be

done
automaticly.











Heine

Perfect - and a great thanks from Norway!!

"Ron de Bruin" wrote:

Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message ...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with name of
sheet as file name. Due to the number of sheets it is needed to be done
automaticly.







Heine

Well - it looks like you both know - anyway, thanks for great support in
short time notice. I had a bad feeling i had to manually cut, past, name and
save them. Would have taken loooong time.

"Bob Phillips" wrote:

Hi Ron,

I know you know. I read your page :-)

Bob


"Ron de Bruin" wrote in message
...
Hi Bob

Easily fixed

I know<g


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message

...
Easily fixed

Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name & ".xls"
Activeworkbook.Close
Next i
End With

End Sub



--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron de Bruin" wrote in message
...
Bob's code not close the new workbooks.
Maybe what you want ?

Here is a example that create a folder with the new workbooks
http://www.rondebruin.nl/copy6.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Bob Phillips" wrote in message
...
Sub SaveSheets()
Dim i As Long

With ThisWorkbook
For i = 1 To .Worksheets.Count
.Worksheets(i).Copy
ActiveWorkbook.SaveAs Filename:=Worksheets(i).Name &

".xls"
Next i
End With

End Sub


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Heine" wrote in message
...
How can i save 200 sheets in an excel file as 200 excel file with

name
of
sheet as file name. Due to the number of sheets it is needed to be

done
automaticly.













All times are GMT +1. The time now is 05:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com