I wonder if someone can help. In the macro below, I start in my main workbook and I make a copy of one of the sheets, called "Customer Report" to a new workbook. I then save this new workbook under the name "New Workbook", close it and therefore return to the main workbook.
I would like to add another task to this macro.
In the main workbook, I also have a worksheet called "Products".
What I would like to do is, once the new workbook has been created, I would like to then add a copy of the "Products" worksheet to the new workbook. And in addition, I would like to rename this worksheet as "Current Products". So the new workbook will have two sheets - "Customer Report" and "Current Products".
I have put where I think the new code will go (that's the easy part!).
Thanks,
MikeG
=================================================
Sub Create_New_Workbook()
Dim wbNew As Workbook, wbCur As Workbook
Set wbCur = ActiveWorkbook
ThisWorkbook.Worksheets("Customer Report").Copy
Set wbNew = ActiveWorkbook
'New code goes here I think
With wbNew
.SaveAs Filename:=Range("New Workbook") & ".xlsx"
End With
wbNew.Close
End Sub
I would like to add another task to this macro.
In the main workbook, I also have a worksheet called "Products".
What I would like to do is, once the new workbook has been created, I would like to then add a copy of the "Products" worksheet to the new workbook. And in addition, I would like to rename this worksheet as "Current Products". So the new workbook will have two sheets - "Customer Report" and "Current Products".
I have put where I think the new code will go (that's the easy part!).
Thanks,
MikeG
=================================================
Sub Create_New_Workbook()
Dim wbNew As Workbook, wbCur As Workbook
Set wbCur = ActiveWorkbook
ThisWorkbook.Worksheets("Customer Report").Copy
Set wbNew = ActiveWorkbook
'New code goes here I think
With wbNew
.SaveAs Filename:=Range("New Workbook") & ".xlsx"
End With
wbNew.Close
End Sub