Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Macro question: how to copy information from another workbook.

Hi

I need some help with a macro. By today it looks like

Sub Update_List
Workbooks.Open FileName:="c:\data\List.xls"
Sheets("ListNr1").Select
Cells.Celect
Selection.Copy
Windows("Paul.xls").Activate
Sheets("ListNr1").Select
Cells.Select
ActiveSheet.Paste
End Sub

I have made about 20 workbooks with 20 different names. Paul is one of
them, and the macro above is stored in that workbook. I need a macro
that always copy the information to the workbook where the macro is
started. Instead of the line

Windows("Paul.xls").Activate

I can use

ActiveWindows.ActivateNext

but this will cause problem if more than one workbook is active by the
time the macro is started.

I would appreciate if someone could help me with this.

Paul
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
Macro to copy information from a row to another sheet in the workb Lin1981 Excel Discussion (Misc queries) 0 August 21st 08 10:00 PM
Copy and Paste information from woorksheet onto different workbook T-bone Excel Discussion (Misc queries) 3 June 27th 07 04:12 PM
Copy information from Excel to Word using 1 macro mathew Excel Discussion (Misc queries) 0 November 2nd 06 10:01 PM
How do I copy the information from one workbook to another? Marsha Excel Discussion (Misc queries) 3 October 17th 05 03:00 PM
Macro to insert new sheets and copy information. Paul Excel Programming 4 September 5th 03 07:50 PM


All times are GMT +1. The time now is 06:41 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"