Bonjour à tous,

J'ai une petite question toute bête, est-ce qu'il est possible de tester de la valeur d'un with.

J'entend par là que j'ai le code suivant :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
With ThisWorkbook.Worksheets("Reporting DO").Range("C:C").Find(Cells(CellPS.Row, Range("Code_NRA").Column).Value)
    Cells(CellPS.Row, Range("Ouverture_ADSL2").Column) = .Offset(0, 7)
    Cells(CellPS.Row, Range("Ouverture_TVNUM").Column) = .Offset(0, 8)
    Cells(CellPS.Row, Range("Ouverture_VDSL2").Column) = .Offset(0, 9)
End With
Mon with étant un range.find il est possible que le find ne trouve rien et que donc mon résultat soit un nothing. Je voudrais donc tester cette possibilité avant d'effectuer mes décalage d'offset. Mais je ne vois comment faire.

En gros je voudrais faire un truc du genre :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
With ThisWorkbook.Worksheets("Reporting DO").Range("C:C").Find(Cells(CellPS.Row, Range("Code_NRA").Column).Value)
    If Not mon with Is Nothing Then
        Cells(CellPS.Row, Range("Ouverture_ADSL2").Column) = .Offset(0, 7)
        Cells(CellPS.Row, Range("Ouverture_TVNUM").Column) = .Offset(0, 8)
        Cells(CellPS.Row, Range("Ouverture_VDSL2").Column) = .Offset(0, 9)
    End If
End With
Vous savez si c'est possible ?