Kran
XLDnaute Nouveau
Bonjour à tous,
J'ai un petit souci :
me renvoie une erreur 1004 sur
Alors que la fonction find fonctionne très bien sur page entière :
Un petit coup de main? d'avance merci
J'ai un petit souci :
Code:
Set wbcs = Workbooks(ActiveWorkbook.Name).Sheets(ActiveSheet.Name)
With wbcs.Range(Cells(num + 1, 1), Cells(100, 1))
Set foundrange = .Find(What:="LINING*", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False) 'lining 2
If Not foundrange Is Nothing Then
num = foundrange.Row
awb.Cells(a, 26) = wbcs.Cells(num + 2, 4)
awb.Cells(a, 27) = wbcs.Cells(num, 10)
awb.Cells(a, 29) = wbcs.Cells(num, 2)
End If
End With
me renvoie une erreur 1004 sur
Code:
with wbcs.Range(Cells(num + 1, 1), Cells(100, 1))
Alors que la fonction find fonctionne très bien sur page entière :
Code:
Set wbcs = Workbooks(ActiveWorkbook.Name).Sheets(ActiveSheet.Name)
Set foundrange = wbcs.Cells.Find(What:="LINING*", After:=ActiveCell, LookIn:=xlValues, LookAt:= _
xlPart, SearchOrder:=xlByColumns, SearchDirection:=xlNext, MatchCase:= _
True, SearchFormat:=False) 'lining 1
If Not foundrange Is Nothing Then
num = foundrange.Row
awb.Cells(a, 26) = wbcs.Cells(num + 2, 4)
awb.Cells(a, 27) = wbcs.Cells(num, 10)
awb.Cells(a, 29) = wbcs.Cells(num, 2)
End If
Un petit coup de main? d'avance merci