O
OFFSET
Guest
Bonsoir à tous,
J'ai un problème avec la fonction find du code ci-dessous à l'utilisation, l'erreur 91 apparaît je ne comprends pas le pb:
Quelqu'un aurait une solution?
Sub CRetardés()
Dim Dte As Range
Dim Sh1 As Worksheet
Dim Sh2 As Worksheet
Set Sh1 = Worksheets("Bilan Maritime")
Set Sh2 = Worksheets("GC-MPR")
Sh1.Select
Range("A2").Select
Set Dte = Range(Selection, Selection.End(xlDown))
For Each x In Dte
If x.Offset(0, 3).Font.ColorIndex = 3 Then
x.End(xlToRight).Select
If Selection <> "-" Then
x.Offset(0, 3).Font.ColorIndex = 0
Else
End If
End If
Worksheets("GC-MPR").select
Range("A2:A1000").Select
If Selection.Find(What:=x.Value, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False) = True Then
ActiveCell.Select
ActiveCell.EntireRow.Select
Selection.Delete
end if
end sub
Merci d'avance pour votre précieuse aide.
Je reste à votre dispo pour plus d'informations.
Cordialement
Offset
J'ai un problème avec la fonction find du code ci-dessous à l'utilisation, l'erreur 91 apparaît je ne comprends pas le pb:
Quelqu'un aurait une solution?
Sub CRetardés()
Dim Dte As Range
Dim Sh1 As Worksheet
Dim Sh2 As Worksheet
Set Sh1 = Worksheets("Bilan Maritime")
Set Sh2 = Worksheets("GC-MPR")
Sh1.Select
Range("A2").Select
Set Dte = Range(Selection, Selection.End(xlDown))
For Each x In Dte
If x.Offset(0, 3).Font.ColorIndex = 3 Then
x.End(xlToRight).Select
If Selection <> "-" Then
x.Offset(0, 3).Font.ColorIndex = 0
Else
End If
End If
Worksheets("GC-MPR").select
Range("A2:A1000").Select
If Selection.Find(What:=x.Value, After:=ActiveCell, LookIn:=xlValues, _
LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False) = True Then
ActiveCell.Select
ActiveCell.EntireRow.Select
Selection.Delete
end if
end sub
Merci d'avance pour votre précieuse aide.
Je reste à votre dispo pour plus d'informations.
Cordialement
Offset