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: 36
Default 2 Files open - Paste to One

Hi-

I have a macro saved in a file ("Macro1.xls"). This macro opens a
file.....does it's thing...closes the file....opens the next
file....does it's thing....closes that file.....etc. This goes on for
over 100 files.

I just added a copy and paste feature that grabs cell values from the
"Macro1.xls" file and pastes them into the open file. The problem I
have is the name of these files changes from day to day. Currently I
have this code which works for a file with the specific file name
"Chris.xls":

Windows("Macro1.xls").Activate
Sheets("Sheet5").Select
Rows("1:2").Select
Selection.Copy
Windows("Chris.xls").Activate
Selection.Insert Shift:=xlDown

Can anyone recommend some code that will paste this value in the file
that is open that is not named "Macro1.xls"?? The only two Excel files
that will be open when this macro runs are the macro file and the final
data file.

TIA!

-Chris

 
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 do I toggle between 2 open excel files and leave both open Big D in Brighton Excel Discussion (Misc queries) 1 November 6th 08 04:28 PM
How to change default Open/Files of Type to "Microsoft Excel Files Tammy Excel Discussion (Misc queries) 2 January 14th 08 11:06 PM
Macro to open *.dat files and save as .txt (comma delimited text files) [email protected] Excel Programming 2 November 30th 05 05:50 AM
Open multiple text files and paste contents to single cell [email protected] Excel Programming 1 October 19th 05 04:05 PM
file open via IE hyperlink causes already open files to shrink and tile Marc Setting up and Configuration of Excel 0 May 4th 05 08:13 PM


All times are GMT +1. The time now is 02:55 PM.

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

About Us

"It's about Microsoft Excel"