Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Hi
XL2003 When copying a sheet into another worbook using VBA, is it possible to do so without also copying any code in that sheet's code window? ie, I have a sheet with some event code, which I want copied into another workbook, without it's event code. Regards - Dave. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Please try this
For eg. The workbook from where you require to copy a sheet is open and also the workbook where in you need to paste that sheet is open. Then right click on the sheet tab (of the sheet to be copied) tick (Create a copy check box) then in the drop down (to Book) you can either place this sheet in a new book or the one which is open. No codes required. -- _______________________ Click "Yes" button if it helps ________ Thanks Suleman Peerzade "Dave" wrote: Hi XL2003 When copying a sheet into another worbook using VBA, is it possible to do so without also copying any code in that sheet's code window? ie, I have a sheet with some event code, which I want copied into another workbook, without it's event code. Regards - Dave. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
From Chip Pearson, code to clear sheet module. Then copy sheet to new wb.
With ThisWorkbook With .VBProject.VBComponents(.Worksheets("sheet17").Cod eName).CodeModule .DeleteLines 1, .CountOfLines End With End With -- Don Guillett Microsoft MVP Excel SalesAid Software "Dave" wrote in message ... Hi XL2003 When copying a sheet into another worbook using VBA, is it possible to do so without also copying any code in that sheet's code window? ie, I have a sheet with some event code, which I want copied into another workbook, without it's event code. Regards - Dave. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Hi Suleman,
What you describe is what I do at present, but the code attached to the sheet goes with it, which I am trying to prevent. Regards - Dave. "Suleman Peerzade" wrote: Please try this For eg. The workbook from where you require to copy a sheet is open and also the workbook where in you need to paste that sheet is open. Then right click on the sheet tab (of the sheet to be copied) tick (Create a copy check box) then in the drop down (to Book) you can either place this sheet in a new book or the one which is open. No codes required. -- _______________________ Click "Yes" button if it helps ________ Thanks Suleman Peerzade "Dave" wrote: Hi XL2003 When copying a sheet into another worbook using VBA, is it possible to do so without also copying any code in that sheet's code window? ie, I have a sheet with some event code, which I want copied into another workbook, without it's event code. Regards - Dave. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Hi Don,
Thanks for that. Works a treat. Regards - Dave. "Don Guillett" wrote: From Chip Pearson, code to clear sheet module. Then copy sheet to new wb. With ThisWorkbook With .VBProject.VBComponents(.Worksheets("sheet17").Cod eName).CodeModule .DeleteLines 1, .CountOfLines End With End With -- Don Guillett Microsoft MVP Excel SalesAid Software "Dave" wrote in message ... Hi XL2003 When copying a sheet into another worbook using VBA, is it possible to do so without also copying any code in that sheet's code window? ie, I have a sheet with some event code, which I want copied into another workbook, without it's event code. Regards - Dave. |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Yeah, but you were the link, so thanks for that. And besides, I'm not sure if
Chip is a real person (or you, for that matter). I don't think real people know all that stuff... Dave. |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Copy a sheet
Chip is real. As for me, the jury is still out.
http://www.cpearson.com/Excel/MainPage.aspx -- Don Guillett Microsoft MVP Excel SalesAid Software "Dave" wrote in message ... Yeah, but you were the link, so thanks for that. And besides, I'm not sure if Chip is a real person (or you, for that matter). I don't think real people know all that stuff... Dave. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Auto Copy/autofill Text from sheet to sheet if meets criteria | Excel Discussion (Misc queries) | |||
Search for rows in one sheet and copy into another sheet based on customer id | Excel Worksheet Functions | |||
How can i copy data from a tabbed working sheet to a summary sheet | Excel Discussion (Misc queries) | |||
'Copy to' Advance Filter depend only on sheet ID not start sheet | Excel Worksheet Functions | |||
relative sheet references ala sheet(-1)!B11 so I can copy a sheet. | Excel Discussion (Misc queries) |