1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| Sub stockage()
Dim Wbstock_journalier As Workbook, WbBestand_2009 As Workbook
Dim plage As Range, c As Range
Dim LastLig As Long
Dim i As Byte
Workbooks.Open "C:\Documents and Settings\PC42\Bureau\suivi stock\stock_journalier.xls"
Set Wbstock_journalier = ActiveWorkbook
ActiveWorkbook.RefreshAll
Workbooks.Open "T:\suivi_stock_2009\Bestand_2009.xls"
Set WbBestand_2009 = ActiveWorkbook
'With WbBestand_2009.Worksheets("novembre")
LastLig = Sheets("novembre").Range("A65536").End(xlUp).Row
Set plage = Sheets("novembre").Range("A7:A" & LastLig)
'With Wbstock_journalier.Worksheets("Tagesbestand")
Set c = plage.Find(Wbstock_journalier.Worksheets("Tagesbestand").Range("A1").Value, LookIn:=xlFormulas, lookat:=xlWhole)
If Not c Is Nothing Then
For i = 1 To 5
c.Offset(0, i).Value = Wbstock_journalier.Worksheets("Tagesbestand").Range("B" & i + 4).Value
Next i
End If
Set c = Nothing
Set plage = Nothing
'End With
'end With
End Sub |
Partager