Option Explicit
Private Sub Worksheet_Activate()
Dim vFEuille As Worksheet
ComboBox1.Clear
For Each vFEuille In ActiveWorkbook.Sheets
If Not vFEuille.Name = ActiveSheet.Name Then
ComboBox1.AddItem vFEuille.Name
End If
Next
End Sub
Private Sub ComboBox1_Click()
Dim OngletBassin As String
Dim PlageSource As Range
OngletBassin = ComboBox1.Value
With Sheets(OngletBassin)
Set PlageSource = .Range(.Range("A2"), .Range("A1000").End(xlUp))
End With
ComboBox2.ListFillRange = OngletBassin & "!" & PlageSource.Address(0, 0)
End Sub
Private Sub ComboBox2_Click()
Dim OngletBassin As String
Dim Rome As String
Dim PlageSource As Range, CellSource As Range
Dim CellCible As Range
Dim C As Byte
If ComboBox1.ListIndex = -1 Then Exit Sub
Set CellCible = ActiveSheet.Range("C45")
OngletBassin = ComboBox1.Value
Rome = ComboBox2.Value
With Sheets(OngletBassin)
Set PlageSource = .Range(.Range("A2"), .Range("A1000").End(xlUp))
End With
For Each CellSource In PlageSource
If CellSource = Rome Then
For C = 0 To 30
CellCible.Offset(0, C) = CellSource.Offset(0, C)
Next
Exit For
End If
Next CellSource
End Sub