From searching on site I have found and adapted some code which works perfectly:
Sub RunMacro1_Click()
Dim NewName As String
Worksheets(Array("Delivery schedule Stoke", "Delivery schedule Meridian")).Copy
NewName = InputBox("Please Enter the name for the new workbook", "New Workbook Name")
With ActiveWorkbook
.SaveAs (NewName & ".xls")
.Close savechanges:=True
End With
ThisWorkbook.Close savechanges:=False
End Sub
HOWEVER...….is it possible to change this to copy over my conditional formatting?
I can copy and paste to a new sheet and achieve this by using:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Can this be incorporated to copy the formatting to the new workbook?
Thank you
Sara
Sub RunMacro1_Click()
Dim NewName As String
Worksheets(Array("Delivery schedule Stoke", "Delivery schedule Meridian")).Copy
NewName = InputBox("Please Enter the name for the new workbook", "New Workbook Name")
With ActiveWorkbook
.SaveAs (NewName & ".xls")
.Close savechanges:=True
End With
ThisWorkbook.Close savechanges:=False
End Sub
HOWEVER...….is it possible to change this to copy over my conditional formatting?
I can copy and paste to a new sheet and achieve this by using:
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Can this be incorporated to copy the formatting to the new workbook?
Thank you
Sara