Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
formula for coping a cell from a diffent sheet | Excel Discussion (Misc queries) | |||
WHY DOES COPING FROM SHEET TO SHEET INCREASE SIZE DRAMATICALLY? | Excel Discussion (Misc queries) | |||
Automatic filtering and coping result to a seperate sheet | Excel Worksheet Functions | |||
Questions on copying from one sheet to the other and coping every other cell. | Excel Discussion (Misc queries) | |||
coping | New Users to Excel |