Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I export data from one worksheet to another? jtroberts Excel Discussion (Misc queries) 2 September 24th 08 09:52 PM
Needed: worksheet export help mainemike Excel Discussion (Misc queries) 1 February 24th 06 02:59 AM
Export each worksheet to csv Trickster Excel Programming 3 November 2nd 03 11:36 PM
Export Worksheet to Access R. Choate Excel Programming 2 August 10th 03 01:13 AM
Export Worksheet to Access Sigmund[_2_] Excel Programming 2 August 9th 03 10:10 PM


All times are GMT +1. The time now is 01:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"