For some reason i get an error 400 i am sure it has to do with 2nd ClearContents on the invoice cells are not protected i checked.Private Sub Workbook_Open() Application.WindowState = xlMaximized End Sub Sub NextInvoice() Sheets("InvoiceB").Range("F5").Value = Sheets("InvoiceB").Range("F5").Value + 1 Sheets("InvoiceB").Range("C8:C14").ClearContents Sheets("InvoiceB").Range("F8:F14").ClearContents Sheets("InvoiceB").Range("A17:G24").ClearContents Sheets("InvoiceB").Range("A29:F36").ClearContents End Sub Sub SaveInvWithNewName() Dim NewFN As Variant ActiveSheet.Copy NewFN = "C:\invoices\Inv" & Range("F5").Value & ".xls" ActiveWorkbook.SaveAs NewFN, FileFormat:=xlWorkbookNormal ActiveWorkbook.Close NextInvoice End Sub
Seems to error 400 on merged text cells not sure how to get around it?.