Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello,
I want to save one worksheet of a workbook as a separate xls-file. I use: Worksheets("test").SaveAs "test1.xls". According to the help this should do the job. But everytime the whole workbook is saved, including all other worksheets. How to solve this? Thanks for your answer. Ed van Wijngaarden |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi E.J.
' copy the sheet to a new workbook Worksheets("test").Copy ' save the worbook with only the sheet test ActiveWorkbook.SaveAs "C:\test1.xls" -- Regards Ron de Bruin http://www.rondebruin.nl "E.J. van Wijngaarden" wrote in message ... Hello, I want to save one worksheet of a workbook as a separate xls-file. I use: Worksheets("test").SaveAs "test1.xls". According to the help this should do the job. But everytime the whole workbook is saved, including all other worksheets. How to solve this? Thanks for your answer. Ed van Wijngaarden |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
This will do it. Sub SaveTestSheetSeparately() Worksheets("test").Copy ActiveWorkbook.SaveAs "test1.xls" End Sub Paul "E.J. van Wijngaarden" wrote in message ... Hello, I want to save one worksheet of a workbook as a separate xls-file. I use: Worksheets("test").SaveAs "test1.xls". According to the help this should do the job. But everytime the whole workbook is saved, including all other worksheets. How to solve this? Thanks for your answer. Ed van Wijngaarden |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for both answers.
I changed the code to: Sub SaveTestSheetSeparately() Application.ScreenUpdating = False Worksheets("test").Copy ActiveWorkbook.SaveAs "test1.xls" ActiveWorkbook.Close Application.ScreenUpdating = True End Sub Now it does exactly what I want. Ed |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
merging single worksheet files into a single workbook | Excel Discussion (Misc queries) | |||
Save a single worksheet in Excel as a single file. | New Users to Excel | |||
Copy from different workbook's worksheet into a single worksheet... | Excel Discussion (Misc queries) | |||
Converting multiple worksheet to a single page worksheet | Excel Discussion (Misc queries) | |||
Saving a single cell | Excel Programming |