Hi
I'm trying to compile a code for customised invoicing on excel using macros and get an error. Help on the missing link below
Regards
Mfana
I'm trying to compile a code for customised invoicing on excel using macros and get an error. Help on the missing link below
Regards
Mfana
Code:
Sub nextInvoice()
Range("L9").Value = "In00" & Text(Now(), "0") & L9.Value + 1
Range("e22").ClearContents
Range("g22").ClearContents
Range("L22").ClearContents
Range("C25:f36").ClearContents
End Sub
Sub SaveInvWithNewName()
Dim NewFN As Variant
'Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "c:\Documents\Housing\hsInv" & "In00" & Text(Now(), "0") & L9.Value & ".xlsm"
ActiveWorkbook.SaveAs NewFN, FileFormat: xlOpenXMLWorkbookMacroEnabled
Print2
ActiveWorkbook.Close
NewInvoice
ActiveWorkbook.Save
End Sub
Sub Print2()
For I = 1 To 2
ActiveSheet.PrintOut
Next I
End Sub
Private Sub Workbook_Open()
End Sub
Last edited by a moderator: