A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
You can use Inputbox rather than Application.Inputbox and test the result with StrPtr:
Direction = InputBox("Quelle est la direction du fichier?", "Nomage", Default)
If StrPtr(Direction) = 0 Then Exit Sub
If Len(Direction) <= 0 Then GoTo Erreur1: 'The input is empty
If Len(Dir(Direction, vbDirectory)) <= 0 Then GoTo Erreur2: 'The path does not exist
Erreur1:
If MsgBox("Veuillez mêtre une addresse dans la fenêtre!", vbCritical, "Erreur") Then
End
Else
End
End If
Stop
Erreur2:
If MsgBox("Le dossier n'existe pas", vbCritical, "Erreur") = vbOK Then
Else
End If
Stop