______Dim volgnr As Long Dim slo As String Dim Toganr As Long Dim bedrag As Currency Dim fname As String Dim datedoc As Date volgnr = Range("B1") slo = Range("B2") Toganr = Range("B3") bedrag = Range("B4") datedoc = Range("B5") Path = "C:\Users\gebruiker\factuur" ' fname = Toganr & slo & volgnr & datedoc fname = Toganr & " - " & slo & " - " & volgnr & " - " & datedoc ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, ignoreprintareas:=False, Filename:=Path & fname
Here I did put the value of cell B5 into "datedoc".
The macro does not work.