Sub test()
Dim ChNomF As Variant, Wbk As Workbook
ChNomF = Application.GetOpenFilename("Classeur,*.xls*")
If VarType(ChNomF) = vbString Then
Set Wbk = Workbooks.Open(ChNomF)
Else
ChNomF = Application.GetSaveAsFilename("Défaut.xlsx", "Classeur,*.xlsx")
If VarType(ChNomF) <> vbString Then Exit Sub
Set Wbk = Workbooks.Add
Wbk.SaveAs ChNomF
End If
End Sub