Sub ventilation()
'
' ventilation Macro
' Macro enregistrée le 25/03/2006 par Propriétaire
'
'
Dim c As Range
Dim derligne As Integer
Range('A3:G14').Sort Key1:=Range('A3'), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
For Each c In Range('a3:a' & Range('a65536').End(xlUp).Row)
On Error GoTo pasbon
With Sheets(Trim(c.Text))
derligne = .Range('b65536').End(xlUp).Row + 1
.Cells(derligne, 2) = c
.Cells(derligne, 3) = c.Offset(0, 2)
.Cells(derligne, 4) = c.Offset(0, 6)
.Cells(derligne, 5) = c.Offset(0, 5)
End With
Next c
Exit Sub
pasbon:
MsgBox 'La feuille ' & c & ' n'existe pas.'
Resume Next
End Sub