Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export worksheet only
i only wish to export one of the worksheets only to another excel file.
it seems i can only export the whole workbook and delete other worksheets. i try to use Worksheets("ABC").Delete but there is popup for yes or no after. how can i make it better? Thanks a lot. tony |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export worksheet only
Tony, Try: Sheets("YourSheet").Copy
by not specifing a location it creates a new workbook, which becomes active. You can then save the activeworkbook to the name you want or to the sheet name if you wish: ActiveWorbook.SaveAs(ActiveSheet.Name,xlNormal) or you could set the new workbook to a variable if you have other things you wish to do with it: Dim wb as Workbook set wb = ActiveWorkbook wb.SaveAs.... does that help any? -- Charles Chickering "A good example is twice the value of good advice." "tony wong" wrote: i only wish to export one of the worksheets only to another excel file. it seems i can only export the whole workbook and delete other worksheets. i try to use Worksheets("ABC").Delete but there is popup for yes or no after. how can i make it better? Thanks a lot. tony |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export worksheet only
Thanks a lot Charles
it works to me. "Charles Chickering" ... Tony, Try: Sheets("YourSheet").Copy by not specifing a location it creates a new workbook, which becomes active. You can then save the activeworkbook to the name you want or to the sheet name if you wish: ActiveWorbook.SaveAs(ActiveSheet.Name,xlNormal) or you could set the new workbook to a variable if you have other things you wish to do with it: Dim wb as Workbook set wb = ActiveWorkbook wb.SaveAs.... does that help any? -- Charles Chickering "A good example is twice the value of good advice." "tony wong" wrote: i only wish to export one of the worksheets only to another excel file. it seems i can only export the whole workbook and delete other worksheets. i try to use Worksheets("ABC").Delete but there is popup for yes or no after. how can i make it better? Thanks a lot. tony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How can I export data from one worksheet to another? | Excel Discussion (Misc queries) | |||
Needed: worksheet export help | Excel Discussion (Misc queries) | |||
Export each worksheet to csv | Excel Programming | |||
Export Worksheet to Access | Excel Programming | |||
Export Worksheet to Access | Excel Programming |