Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
It looks like it will work great! Thank you!
" wrote: Hello Rog, Try this piece of code: Sub copy_to_closed_workbook Sheets("Sheet1").Select Workbooks.Open Filename:="C:\Filename.xls" Windows("Current Workbook.xls").Activate Sheets("Sheet1").Select Sheets("Sheet1").Copy After:=Workbooks("Filename.xls").Sheets(1) End Sub Let me know if it works. Rog wrote: I am trying to copy a worksheet from one Excel workbook to another workbook using a macro, but all the formatting is lost using a copy/paste. How can I do this since the path and workbook names are different? I cannot use the copy worksheet feature by right clicking the tab because the destination workbook is not open at the time of the copy. I have defined the path in the macro and it works fine except for the formatting problem. Thanks. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
data from one workbook automatically entered into another workboo. | Excel Discussion (Misc queries) | |||
Duplicating/Mirror Data into another worksheet within same workboo | Excel Worksheet Functions | |||
How can I copy the header and footers onto every page on a workboo | Excel Worksheet Functions | |||
Can you code a macro so it runs multiple times in the same workboo | Excel Discussion (Misc queries) | |||
How do I copy a worksheet without the link to the original workboo | Excel Discussion (Misc queries) |