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: 9
Default Macro independent of newbook name

I have a macro which should copy one sheet to a new book and then I
jump back and copy another sheet to the same new book. My problem how
do I make my macro independent of file names of the file I am copying
from and to?

I have called the file I am copying from ThisWorkbook but what should
I call the file I am copying to, mentioned as "book1" in the macro
below:

ThisWorkbook.Activate
Sheets("A&S kvt").Select
Range("A1:U56").Select
Selection.Copy
Windows("book1").Activate
Sheets("Sheet2").Select
ActiveSheet.Paste

Can someone help?

From
HA14

 
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
Independent column widths Kathleen Excel Worksheet Functions 2 August 22nd 06 05:47 PM
Independent Lists... Corey New Users to Excel 2 July 10th 06 07:17 PM
independent macros XCESIV[_14_] Excel Programming 5 May 23rd 06 04:44 AM
Run a .xla as a independent application triki Excel Programming 3 August 12th 05 05:15 PM
can one cell contain more than one independent number John K Excel Discussion (Misc queries) 2 July 2nd 05 03:28 AM


All times are GMT +1. The time now is 09:22 AM.

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"