J'ai pas compris ce que tu voulais dire par "sont fermés".
En fait depuis ce matin j'essaie de faire des trucs, je pense avoir presque réussi mais j'ai une erreur de programmation sur visual basic, voici mon code :
Sub Choixville()
If Cells(2, 1) = "Rennes" Then
x = 0
y = 0
While Workbooks("Rennes.xls").Worksheets("Rennes").Cells(1 + x, 2) <> ""
Cells(1 + x, 4) = Workbooks("Rennes.xls").Worksheets("Rennes").Cells(1 + x, 2)
x = x + 1
Wend
While Application.Workbooks("Rennes.xls").Worksheets("Rennes").Cells(1 + y, 3) <> ""
Cells(1 + y, 5) = Application.Workbooks("Rennes.xls").Worksheets("Rennes").Cells(1 + y, 3)
y = y + 1
Wend
End If
If Cells(2, 1) = "Paris" Then
x = 0
y = 0
While Workbooks("Paris.xls").Worksheets("Paris").Cells(1 + x, 2) <> ""
Cells(1 + x, 4) = Workbooks("Paris.xls").Worksheets("Paris").Cells(1 + x, 2)
x = x + 1
Wend
While Application.Workbooks("Paris.xls").Worksheets("Paris").Cells(1 + y, 3) <> ""
Cells(1 + y, 5) = Application.Workbooks("Paris.xls").Worksheets("Paris").Cells(1 + y, 3)
y = y + 1
Wend
End If
End Sub
Il me dit qu'il y a erreur "l'indice n'appartient pas à la sélection" je ne comprends pas trop l'erreur.
Merci d'avance.