View Full Version : how to copy 2 sheets from a ws to another ws
skaswani
10-22-2007, 10:06 AM
hello
 
i want to Copy 2 worksheets from one Workbook to New workbook
 
 
suppose my sheets names are  A and B
 
how to copy these 2 sheets into NEW WORKBOOK 
 
 
 
thanks
lucas
10-22-2007, 10:13 AM
Try this I used the macro recorder to get it:
Sub Macro3()
    Sheets(Array("A", "B")).Copy
End Sub
skaswani
10-23-2007, 09:27 AM
thank you sir, just one quick question.. can i name this (new worksheet)  as "daily-report.xls"
 
 
thanks
lucas
10-23-2007, 04:00 PM
You will have to change the path to save the file and the file name to suit your need.....
Sub SaveSales()
    Application.ScreenUpdating = False
    Worksheets(Array("A", "B")).Copy
    ActiveWorkbook.SaveAs "F:\Temp\Sales.xls"
    ActiveWorkbook.Close
    Application.ScreenUpdating = False
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.