Bonjour,
j'ai un problème de prog. je ne suis pas vraiment bon en prog.
je veux apartir d'un bouton sur un formulaire rechercher un valeur (dans tout le classeur) d'un textbox sur le meme formulaire.
mon code qui ne fonctionne pas est ca me donne erreur d'exécution 9 ( l'indice n'appartient pas à la sélection):
Private Sub btnrecherche_Click()
Dim vdatedebut As String
Dim vdatefin As String
Dim refdate As Object
Dim Sht As Worksheet
vdatedebut = txtdebut.Text
vdatefin = txtfin.Text
For Each Sht In ActiveWorkbook.Worksheets
Set rngFind = Sht.Cells.Find(What:=vdatedebut, After:=ActiveCell, LookIn:=xlValue, LookAt _
:=xlWithinWorkbook, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False).Activate
If Not rngFind Is Nothing Then
ActiveCell.Select
End If