Bonjour,
Si quelqu'un pouvais me renseigné car mon code me met une erreur d’exécution 91 variable objet ou variable de type with non définie .
Cela bloque a la ligne en rouge. Par contre si je met le range comme la ligne verte cela fonctionne.
Je ne vois pas pourquoi? Qqun a t'il une idée?
Dim CODE As Range
Dim CODEE As Range
Dim X As Integer
Dim Y As Integer
Dim Nom As String, i As Long, j As Long
Sheets("Extract").Select
j = 7
With Sheets("Evaluation Transport")
Do While Cells(j, 1) <> ""
Nom = Cells(j, 1)
For i = 9 To .Range("B23")
If Nom = Worksheets("Evaluation Transport").Cells(i, 2) Then
Set CODE = Worksheets("Extract").Cells(4, 2)
With Worksheets("Evaluation Transport").Range(.Cells(4, 8), .Cells(12, 8))
'With Worksheets("Evaluation Transport").Range("E8:L8")
Set CODEE = .Find(CODE, LookIn:=xlValues)
End With
X = CODEE.Column 'Renvoi le numero de colonne
Y = CODEE.Row
End If
Next
j = j + 1
Loop
End With
End Sub
Si quelqu'un pouvais me renseigné car mon code me met une erreur d’exécution 91 variable objet ou variable de type with non définie .
Cela bloque a la ligne en rouge. Par contre si je met le range comme la ligne verte cela fonctionne.
Je ne vois pas pourquoi? Qqun a t'il une idée?
Dim CODE As Range
Dim CODEE As Range
Dim X As Integer
Dim Y As Integer
Dim Nom As String, i As Long, j As Long
Sheets("Extract").Select
j = 7
With Sheets("Evaluation Transport")
Do While Cells(j, 1) <> ""
Nom = Cells(j, 1)
For i = 9 To .Range("B23")
If Nom = Worksheets("Evaluation Transport").Cells(i, 2) Then
Set CODE = Worksheets("Extract").Cells(4, 2)
With Worksheets("Evaluation Transport").Range(.Cells(4, 8), .Cells(12, 8))
'With Worksheets("Evaluation Transport").Range("E8:L8")
Set CODEE = .Find(CODE, LookIn:=xlValues)
End With
X = CODEE.Column 'Renvoi le numero de colonne
Y = CODEE.Row
End If
Next
j = j + 1
Loop
End With
End Sub