Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Copy a worksheet from a workbook
Ok I am sure this has been covered a million times but I am struggling to find something that will help me so I appologise up front. I am working with XL 2003 SP3 and have a spreadsheet (lets say its called "ORIGINAL") that is open and running a macro. During this macro I would like it to open another spreadsheet (lets say its called "SECONDARY") and copy a worksheet called "Sheet1" and then paste it back into the "ORIGINAL" spreadsheet. I have tried various methods and get constantly changing results. Does anyone have any very simple code PLEEEEEEEEEASE. -- BRABUS |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Copy a worksheet from a workbook
The macro recorder is your friend. Try it and then post back with questions.
-- Don Guillett Microsoft MVP Excel SalesAid Software "BRABUS" wrote in message ... Ok I am sure this has been covered a million times but I am struggling to find something that will help me so I appologise up front. I am working with XL 2003 SP3 and have a spreadsheet (lets say its called "ORIGINAL") that is open and running a macro. During this macro I would like it to open another spreadsheet (lets say its called "SECONDARY") and copy a worksheet called "Sheet1" and then paste it back into the "ORIGINAL" spreadsheet. I have tried various methods and get constantly changing results. Does anyone have any very simple code PLEEEEEEEEEASE. -- BRABUS |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Copy a worksheet from a workbook
I have re-recorded a macro to do the copying, but when I run the macro using a keyboard shortcut it stops once it opens the Secondary.MHTML file This is the macro Sub OpenWorkbookAndCopySheet() ' ' OpenWorkbookAndCopySheet Macro ' ' Keyboard Shortcut: Ctrl+Shift+T ' Workbooks.Open Filename:="C:\Secondary.MHTML" Cells.Select Range("C1").Activate Selection.Copy Windows("Original.xls").Activate Sheets("Sheet2").Select Range("A1").Select ActiveSheet.Paste Windows("Secondary.MHTML").Activate ActiveWindow.Close Range("A1").Select Sheets("Sheet1").Select End Sub -- BRABUS |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Copy Worksheet from one Workbook to another Workbook | Excel Discussion (Misc queries) | |||
Copy Worksheet to another Workbook | Excel Discussion (Misc queries) | |||
Copy Data from Workbook into specific Worksheet in other Workbook? | Excel Discussion (Misc queries) | |||
copy worksheet to another workbook | Excel Discussion (Misc queries) | |||
copy worksheet from closed workbook to active workbook using vba | Excel Worksheet Functions |