Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy Worksheet from one Workbook to another Workbook Autumn Dreams Excel Discussion (Misc queries) 5 September 12th 08 10:55 PM
Copy Worksheet to another Workbook Tail Wind Excel Discussion (Misc queries) 5 January 2nd 08 01:02 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
copy worksheet to another workbook jtaiariol Excel Discussion (Misc queries) 5 January 1st 06 06:32 PM
copy worksheet from closed workbook to active workbook using vba mango Excel Worksheet Functions 6 December 9th 04 07:55 AM


All times are GMT +1. The time now is 12:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"