Application.intersect sur range variable

Airone784

XLDnaute Occasionnel
Bonjour,

J'ai ce code :

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim nb As Integer
nb = Range("A10").End(xlDown).Row + 8

If Not Application.Intersect(Target, Range(Cells(nb, "D"), Cells(nb, "H"), Cells(nb, "L"), Cells(nb, "P"), Cells(nb, "T"), Cells(nb, "X"))) Is Nothing Then
Msgbox "Essai de code"
End if

Quand je tape ce code j'ai un message d'erreur :

Erreur de compilation :
nombre d'arguments incorrect ou affectation de propriété incorrecte

Pouvez-vous m'aider en me disant ce qui cloche dans mon code car je sèche.

Merci d'avance pour l'aide.
 

Discussions similaires