View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
HA14 HA14 is offline
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