Hej
Nextinvoice kan ikke stå alene enten mangler der noget, eller kalder den en funktion.
,
jeg har fjernet Nexinvoice og nu gemmer programmet filen til disk.
Sub saveInvwithneName()
Dim NewFN As String
'copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "E:\Dokumenter\1-kartoteker\service 2018\excel\" & Range("f15") & " - " & Range("b5") & " - " & Range("c15") & " - " & Range("f10") & " - " & Range("f11") & " - " & Range("f12").Value & " .xlsx "
ActiveWorkbook.SaveAs NewFN, FileFormat:=51
ActiveWorkbook.Close
'nextInvoice
End Sub