Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy worksheet without code behind
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy worksheet without code behind
On May 4, 3:37 pm, 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 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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Copy worksheet without code behind
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
copy worksheet without code behind | Excel Programming | |||
Help with Code to Copy to New Worksheet | Excel Programming | |||
Copy Worksheet with Code | Excel Programming | |||
How to copy a worksheet without its code ? | Excel Programming | |||
Code to copy range vs Copy Entire Worksheet - can't figure it out | Excel Programming |