PC Review


Reply
Thread Tools Rate Thread

Copy worksheet without code behind

 
 
=?Utf-8?B?Y2xhcmE=?=
Guest
Posts: n/a
 
      4th May 2007
Hi all,

I have to copy a worksheet from one workbook into another workbook, but the
code behind the worksheet must left alone. Could you tell me how?

Clara
--
thank you so much for your help
 
Reply With Quote
 
 
 
 
LT
Guest
Posts: n/a
 
      4th May 2007
On May 4, 3:37 pm, clara <c...@discussions.microsoft.com> wrote:
> Hi all,
>
> I have to copy a worksheet from one workbook into another workbook, but the
> code behind the worksheet must left alone. Could you tell me how?
>
> Clara
> --
> thank you so much for your help


I'm not knowing how to do that with code, but I do know how to do that
manually if it will help.

hit alt+F11 to bring up the VBA editor. Look on the left hand side
you will see a list of open workbooks and the worksheets belonging to
them.

>From the COPIED worksheet, double click the sheet name of the copy, a

code window will appear with all the code tha is attached to the
sheet. Select it all and then delete and then go back to the Excel
workbook that is your copy and save that.

Hope that Helps!

-LT

 
Reply With Quote
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      4th May 2007
Dim srcbook as Workbook, destBook as Workbook
Dim sh as Worksheet
set srcBook = Activeworkbook
set sh = srcBook.Worksheets("SheetName")
set destBook = workbooks("Dest.xls")
With destbook
.Worksheets.Add after:=.worksheets(.worksheets.count)
sh.cells.copy .Worksheets(.worksheets.count).Cells
End With

--
Regards,
Tom Ogilvy




"clara" wrote:

> Hi all,
>
> I have to copy a worksheet from one workbook into another workbook, but the
> code behind the worksheet must left alone. Could you tell me how?
>
> Clara
> --
> thank you so much for your help

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Code to Copy to New Worksheet prkhan56@gmail.com Microsoft Excel Programming 2 7th Feb 2007 06:17 PM
Copy VB code from one worksheet to another using VBE =?Utf-8?B?ZUR1ZGU=?= Microsoft Excel Programming 2 19th Oct 2006 04:25 AM
Copy Worksheet with Code Bill Microsoft Excel Programming 1 28th Sep 2005 10:21 PM
Code to copy range vs Copy Entire Worksheet - can't figure it out Mike Taylor Microsoft Excel Programming 1 15th Apr 2004 08:34 PM
Copy Add-In Worksheet to Client Worksheet EXCLUDING VBA Code Mark D'Agosta Microsoft Excel Programming 1 8th Mar 2004 04:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:08 PM.