Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Coping a sheet

Hello

Can you tell me what the VBA code is for copying a sheet out of one book into a new one

Thanks in advance
James
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Coping a sheet

Hi
have a look at
http://www.rondebruin.nl/copy4.htm

--
Regards
Frank Kabel
Frankfurt, Germany

"James" schrieb im Newsbeitrag
...
Hello,

Can you tell me what the VBA code is for copying a sheet out of one

book into a new one?

Thanks in advance,
James


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Coping a sheet

Hi James

You can use
Activesheet.Copy or Sheets("Sheet3").Copy

To create a new workbook with only that sheet


Or this

This example will copy the first sheet of the activeworkbook.
It open the file C:\test.xls and paste the sheet.
After that it will save/close the file C:\test.xls

Sub test()
Dim Wb1 As Workbook
Dim Wb2 As Workbook
Application.ScreenUpdating = False
Set Wb1 = ActiveWorkbook
Set Wb2 = Workbooks.Open("C:\test.xls")
Wb1.Worksheets(1).Copy after:= _
Wb2.Sheets(Wb2.Sheets.Count)
Wb2.Close True
Application.ScreenUpdating = True
End Sub


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


"James" wrote in message ...
Hello,

Can you tell me what the VBA code is for copying a sheet out of one book into a new one?

Thanks in advance,
James



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
formula for coping a cell from a diffent sheet Shallow Excel Discussion (Misc queries) 5 September 19th 08 05:46 PM
WHY DOES COPING FROM SHEET TO SHEET INCREASE SIZE DRAMATICALLY? Jerry Excel Discussion (Misc queries) 0 June 1st 07 05:06 PM
Automatic filtering and coping result to a seperate sheet Richard P Excel Worksheet Functions 2 April 23rd 06 07:28 PM
Questions on copying from one sheet to the other and coping every other cell. KatyLady Excel Discussion (Misc queries) 10 June 7th 05 08:29 AM
coping ben kiser New Users to Excel 1 April 11th 05 01:41 PM


All times are GMT +1. The time now is 09:01 PM.

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

About Us

"It's about Microsoft Excel"