View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
matthias matthias is offline
external usenet poster
 
Posts: 33
Default copy spreadsheet in new workbook, macro problem

hi if i run this macro,he copies the 2 spreadsheets as i want, but i
want the 2 copied sheets in the same workbook!! can i do this???


If ActiveWorkbook.Worksheets("sheet1").Range("A1") =
ActiveWorkbook.Worksheets("sheet2").Range("A1") Then
ActiveWorkbook.Worksheets("sheet1").Copy
Cells.Copy
Cells.PasteSpecial xlPasteValues
Cells(1).Select
Application.CutCopyMode = False

ActiveWorkbook.Worksheets("sheet2").Copy
Cells.Copy
Cells.PasteSpecial xlPasteValues
Cells(1).Select
Application.CutCopyMode = False

End If





End Sub