Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 62
Default copy and paste data (includes groups...)

hi,
i need to copy spesific sheet from one workbook to another existing sheet in
other workbook.
both sheets includes Grouping.
i wrote a code that copy and paste, but the actual result is that the
grouping at the end is not related to the new data i pasted.
what should i add to my code in order to copy also the groups.
my code:

Workbooks(NewBook).Sheets("a").Cells.Select
Selection.Copy
...
Workbooks(Activebook).Sheets("b").Select
Range("A1").PasteSpecial Paste:=xlPasteAll
--
Miri Tz.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default copy and paste data (includes groups...)

I always do worksheet copies like this

Workbooks(NewBook).Sheets("a").cells.Copy _
destination:= Workbooks(Activebook).Sheets("b").cells


Maybe you just want to delete the old sheet and the copy entiore sheet this
copies more info

Workbooks(Activebook).Sheets("b").Delete
Workbooks(NewBook).Sheets("a").Copy _
after:=Workbooks(Activebook).Sheets(1)
ActiveWorkbook.Name = "b"



"Miri" wrote:

hi,
i need to copy spesific sheet from one workbook to another existing sheet in
other workbook.
both sheets includes Grouping.
i wrote a code that copy and paste, but the actual result is that the
grouping at the end is not related to the new data i pasted.
what should i add to my code in order to copy also the groups.
my code:

Workbooks(NewBook).Sheets("a").Cells.Select
Selection.Copy
...
Workbooks(Activebook).Sheets("b").Select
Range("A1").PasteSpecial Paste:=xlPasteAll
--
Miri Tz.

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
filted data, copy and paste a col. puts data in wrong row how fix chris_fig New Users to Excel 1 October 16th 06 04:26 PM
I want to copy cell from word that includes line breaks to excel sueCBA Excel Discussion (Misc queries) 1 July 12th 06 05:10 PM
Excel cut/Paste Problem: Year changes after data is copy and paste Asif Excel Discussion (Misc queries) 2 December 9th 05 05:16 PM
copy and paste between cells that have data mstack Excel Worksheet Functions 1 November 16th 05 09:16 PM
copy/paste data between worksheets Anthony Excel Discussion (Misc queries) 0 February 5th 05 12:31 AM


All times are GMT +1. The time now is 07:05 PM.

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"