Sub Test()
Dim NomFeui As String
NomFeui = InputBox("Entrez un nom de feuille")
On Error Resume Next
Worksheets(NomFeui).Activate
If Err Then MsgBox "La feuille """ & NomFeui & """ n'existe pas."
End Sub
Sub Feuilles()
Dim box$, txt$, mes$, n&, s As Object
1 box = InputBox("Entrez une chaîne de caractères :", "Nom de feuille", box)
If box = "" Then Exit Sub
txt = "*" & LCase(box) & "*"
mes = ""
n = 0
For Each s In Sheets
If LCase(s.Name) Like txt Then
mes = mes & Chr(10) & s.Name
n = n + 1
End If
Next
If n = 0 Then MsgBox "Pas de feuille correspondante": GoTo 1
If n > 1 Then MsgBox n & " feuilles possibles :" & Chr(10) & mes: GoTo 1
Sheets(Split(mes, Chr(10))(1)).Activate
End Sub
J'écris alors toujours:If ComboBox1.ListIndex = -1 Then CommandButton1.Enabled = False Else CommandButton1.Enabled = True
CommandButton1.Enabled = ComboBox1.ListIndex <> -1
Oui mais enfin quand même pas vraiment beaucoup plus que ceux qui ne joignent aucun travail personnel à leur demande...c'est vrai que Bernard et moi sommes un peu fainéants