Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / April 2007

Tip: Looking for answers? Try searching our database.

copy worksheet from one sourceA to sourceB

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bob Ford - 25 Apr 2007 01:42 GMT
Hello
I spent hours today trying to figure this out. I am trying to copy a
worksheet from a workbook (contains groupings and subtotals) to another
workbook. It copies it but it does not retain the groupings (drill-down
effect).

The code I used was based from a recorded macro.

Please advise.
TIA!
Bon
Barb Reinhardt - 25 Apr 2007 02:50 GMT
Have you tried to right click on the worksheet tab and copy it to the other
workbook?

> Hello
> I spent hours today trying to figure this out. I am trying to copy a
[quoted text clipped - 7 lines]
> TIA!
> Bon
Gord Dibben - 25 Apr 2007 02:50 GMT
Bob

What method are you using to copy the worksheet?

Right-click on a sheet tab and "move or copy" the entire worksheet?

Or just selecting all cells and copy then paste?

The latter will not retain any data grouping whereas the former will.

Gord Dibben  MS Excel MVP

>Hello
>I spent hours today trying to figure this out. I am trying to copy a
[quoted text clipped - 7 lines]
>TIA!
>Bon
Bob Ford - 25 Apr 2007 03:31 GMT
I forgot to mention that I need it via VBA code.  I know how to idt through
shortcuts and via menu.

> Hello
> I spent hours today trying to figure this out. I am trying to copy a
[quoted text clipped - 7 lines]
> TIA!
> Bon
Barb Reinhardt - 25 Apr 2007 13:02 GMT
Let's say you refer to the book you are copying to as aWB and the worksheet
you are copying as oWS.   Do this

           oWS.Copy After:=aWB.Sheets(aWB.Worksheets.Count)

If you need more assistance, let us know.

HTH,
Barb Reinhardt

> I forgot to mention that I need it via VBA code.  I know how to idt through
> shortcuts and via menu.
[quoted text clipped - 10 lines]
> > TIA!
> > Bon

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.