Bonjour
Si tu avais poster simplement avec une question(sans mon nom) tu aurais eu la réponse tout de suite:
Voici une variante plus courte:
Dim SearchString, SearchChar, MyPos
SearchChar = TextBox1.Value
'ici B1 a la dernière
For Each cell In Range('B1:B' & Range('B65536').End(xlUp).Row)
SearchString = cell.Text
MyPos = InStr(SearchString, SearchChar)
cell.Select
If TextBox1 = '' Then
MsgBox 'Mettre un mot pour la recherche'
TextBox1.SetFocus
Exit Sub
Else
If MyPos > 0 Then
MsgBox 'Le mot *' & TextBox1.Value & '* a été trouvé'
MsgBox 'Mot trouvé est à cette adresse: ' & cell.Address
Select Case MsgBox(' Voulez-vous sélectionner celui-là? ', vbYesNo)
Case vbYes
Exit Sub
Unload Me
Case vbNo
End Select
End If
End If
Next
A+
Temjeh
Message édité par: temjeh, à: 13/06/2006 01:24