Hi,
I have Excel 2010, and I'm getting an error message when I press the Clear and save button while using my invoice on my computer
the error that i get is 400
i want the macro to save the invoice as (for example) invoice # 31254
and once it saves i want it to close automaticalluy
the code im using is
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "C:\Documents and Setting\Renzo\My Documents\INVOICES 2012\Invoice & Range("E8").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:"xlOpenXMLWorkbook
ActiveWorkbook.Close
Nextinvoice
End Sub
please help
I have Excel 2010, and I'm getting an error message when I press the Clear and save button while using my invoice on my computer
the error that i get is 400
i want the macro to save the invoice as (for example) invoice # 31254
and once it saves i want it to close automaticalluy
the code im using is
Sub SaveInvoiceWithNewName()
Dim NewFN As Variant
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "C:\Documents and Setting\Renzo\My Documents\INVOICES 2012\Invoice & Range("E8").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:"xlOpenXMLWorkbook
ActiveWorkbook.Close
Nextinvoice
End Sub
please help
