Set fs = CreateObject("Scripting.FileSystemObject")
If Not fs.FileExists(ThisWorkbook.Path & "\" & TextBox13.Value & "---" & TextBox25.Value & "\" & TextBox1.Value & "---" & TextBox2.Value & ".pdf") Then 'controle of bestand al bestaat
Sheets("MULTICARE | ELEGANZA 5").Range("A1:K61").ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ThisWorkbook.Path & "\" & TextBox13.Value & "---" & TextBox25.Value & "\" & TextBox1.Value & "---" & TextBox2.Value & ".pdf", _
OpenAfterPublish:=False 'True
Else
Dim RapportOpslaan As Integer
RapportOpslaan = MsgBox("Dit rapport is al opgeslagen, wil je het overschrijven", vbYesNo + vbQuestion, "RAPPORT BESTAAT AL!")
If RapportOpslaan = vbYes Then
Sheets("MULTICARE | ELEGANZA 5").Range("A1:K61").ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=ThisWorkbook.Path & "\" & TextBox13.Value & "---" & TextBox25.Value & "\" & TextBox1.Value & "---" & TextBox2.Value & ".pdf", _
OpenAfterPublish:=False 'True
Else
'rapport wordt niet opgeslagen/overschreven
End If
End If