Hi
I have the following code which I found and it works by copying the active sheet and saving as a new file name, however I'd like to save the whole workbook as a new file name. I also don't know how to change the word Invoice to Cost Estimate? Any help much appreciated.
Sub NextInvoice()
Range("I1").Value = Range("I1").Value + 1
Range("B16:F30").ClearContents
Range("H16:H30").ClearContents
End Sub
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveSheet.Copy
NewFN = "C:\Temp\Cost_Estimate_" & Range("I1").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
I have the following code which I found and it works by copying the active sheet and saving as a new file name, however I'd like to save the whole workbook as a new file name. I also don't know how to change the word Invoice to Cost Estimate? Any help much appreciated.
Sub NextInvoice()
Range("I1").Value = Range("I1").Value + 1
Range("B16:F30").ClearContents
Range("H16:H30").ClearContents
End Sub
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a New Workbook
ActiveSheet.Copy
NewFN = "C:\Temp\Cost_Estimate_" & Range("I1").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub