LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Need a macro to copy a range in one workbook and paste into another workbook

Hi all,
I'm experienced in excel, but not very good with Macros.
I am trying to write a macro to copy from 1 workbook into another.
Using Window 2K SP4, and MS Office 2k SR1
So far I have only this using the Macro Recorder:
Sub ITHDdocID()
'
' ITHDdocID Macro
' Macro recorded 25/06/2004 by husky101
'

'
Windows("ITHD Reports.xls").Activate
Range("A6").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Windows("ITHD Monthly Calculator for reports V5.xls").Activate
ActiveSheet.Paste
Range("B3").Select
End Sub

When I run this macro I receive a 'Subscript out of range error', on
line 5 the destination wkbk.
I need to copy an unkown range down from ITHD!A6 from wkbk (ITHD
Reports.xls)
and paste into wkbk2 (ITHD Monthly Calculator for reports V5.xls) into
sheet Time!A3

Any assistance will be greatly appreciated.
Cheers Paul
 
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
How to copy a range of cells and paste into a new workbook in differentcolumns Mas[_4_] Excel Discussion (Misc queries) 3 August 16th 11 02:57 PM
Macro to copy/paste from one workbook to another pm Excel Discussion (Misc queries) 8 May 20th 10 08:57 PM
Macro to Copy / paste from 1 workbook to another David P. Excel Discussion (Misc queries) 6 April 20th 09 11:22 PM
macro to copy and paste into another workbook spirosu Excel Discussion (Misc queries) 1 March 15th 06 06:26 PM
Copy a range of cells in an unopened workbook and paste it to the current workbook topstar Excel Programming 3 June 24th 04 12:50 PM


All times are GMT +1. The time now is 10:21 PM.

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"