Option Explicit
Public Titre As String
Public Reponse As String
Sub Mon_code()
Dim Msg$, l As Long
Titre = "Super Titres1" & Application.Rept(".", 242) 'voir avec 243
MsgBox Len(Titre), 64, "limite titre : "
Msg = "Saisir votre type d'affichage trimestriel" & vbLf & _
"(relatif aux tableaux avec synthèse trimestrielle)" & vbLf & _
"Synthétique: totaux trimestriels" & vbLf & _
"Détaillé: trimestres et mois du dernier trimestre" & vbLf
l = 241 - Len(Msg) 'voir avec 242
Msg = Msg & Application.Rept(".", l) & vbLf & "Saisir S ou D"
MsgBox Msg & vbLf & Len(Msg), 64, "limite texte :"
Reponse = Application.InputBox(Msg, Titre, "S", 2)
Select Case Reponse
Case "S": MsgBox "vous avez choisi S"
Case "D": MsgBox "vous avez choisi D"
Case Else: MsgBox "Il faut respecter les consignes !", 16, "n'importe quoi..."
End Select
End Sub