Re : Petit souci de syntaxe
Salut à vous, à tous.
voici le code :
Dim info As String, cellule As Range, Adr As String
Dim variable As Variant, Compteur As Long, point As Integer, valeur As String
info = InputBox(Prompt:= _
"Chaîne recherchée.", _
Title:="Rechercher et Remplacer")
If info = "" Then Exit Sub
Sheets("agences").Select
With ActiveSheet
Set cellule = .Cells.Find(What:=info, _
LookIn:=xlValues, LookAt:=xlPart)
If Not cellule Is Nothing Then
Adr = cellule.Address
Do
Do
point = point + 1
point = InStr(point, cellule, info, vbTextCompare)
If point <> 0 Then Compteur = Compteur + 1
Loop Until point = 0
cellule.EntireRow.Select
Reponse = MsgBox("Est ce cette ligne", vbYesNo, "Question")
If Reponse = vbNo Then
GoTo Suivant
End If
cellule.Select
valeur = cellule.End(xlToLeft).Value
Sheets("synthese").Select
ActiveSheet.PivotTables("Suivi des loyers").PivotFields("n° agence"). _
CurrentPage = valeur
Application.CutCopyMode = False
End
Suivant:
cellule.Select
Set cellule = .Cells.FindNext(After:=cellule)
If cellule Is Nothing Then Exit Do
If cellule.Address = Range(Adr).Address Then Exit Do
Loop While Not cellule Is Nothing
End If
End With
Set cellule = Nothing
End Sub
j'ai remplacé ce que je voulais... Merci Masterdico
si des choses vous paraissent à corriger n'hésitez pas.. Après tout je suis qu'au début