Copying Sheets

  • Thread starter Thread starter ianripping
  • Start date Start date
I

ianripping

I have this code

Workbooks.Open Filename:=Range("C1").Value
Sheets("Sheet1").Select
Selection.Copy
ActiveWorkbook.Close SaveChanges:=False
Windows("Book1.xls").Activate
Sheets("Sheet2").Select
ActiveSheet.Paste

The cod looks at the path in C1 and opens the file listed there. I
then copies Sheet1 i that workbook. It should then paste it int
Book1.xls but doesm't.

Any ideas what's wrong
 
its ok i've done it again. I should do this before I post I know.

Workbooks.Open Filename:=Range("C1").Value
ActiveWindow.WindowState = xlNormal
Sheets("Sheet2").Select
Sheets("Sheet2").Copy Before:=Workbooks("Book1.xls").Sheets(1)
Sheets("Sheet1").Select
ActiveWindow.WindowState = xlMaximized

MsgBox ("Completed Copying")

End Su
 
Back
Top