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 27 28 29 30 31 32 33 34 35
| Private Sub MAJfeuille(arg As String, nbenveloppe As Integer, voie As Integer)
'ici ya plein de truc avant et après
If Worksheets(Configuration).Cells(lignec, c1).Value = "oui" Then
Worksheets(modele).Cells(l2, 2).Value = "oui"
lignevoie = CountColumnItems2(lignec, c1, Configuration)
l = LookForColumn(1, Configuration, "Nb voie")
nbvoie = CountColumnItems3(lignec, l, Configuration, lignevoie)
ReDim tabvoie(nbvoie)
a = 1
ComboBox4.Clear
For i = 1 To lignevoie
If Worksheets(Configuration).Cells(lignec + i - 1, l).Value <> "" Then
tabvoie(a) = Worksheets(Configuration).Cells(lignec + i - 1, l).Value
ComboBox4.AddItem Worksheets(Configuration).Cells(lignec + i - 1, l).Value
a = a + 1
End If
Next i
lignec = LookForRow1(l, lignec, Configuration, tabvoie(voie + 1))
c1 = LookForColumn(1, Configuration, "Nom réseau")
Worksheets(modele).Cells(l1, 2).Value = Worksheets(Configuration).Cells(lignec, c1).Value
ComboBox4.ListIndex = voie
'Set marange = Worksheets(modele).Range(Worksheets(modele).Cells(2, 53), Worksheets(modele).Cells(5, 53))
'ComboBox4.ListFillRange = marange.Address
Else
Worksheets(modele).Cells(l2, 2).Value = "non"
c1 = LookForColumn(1, Configuration, "Nb voie")
ComboBox4.Clear
ComboBox4.Value = Worksheets(Configuration).Cells(lignec, c1).Value
c1 = LookForColumn(1, Configuration, "Nom réseau")
Worksheets(modele).Cells(l1, 2).Value = Worksheets(Configuration).Cells(lignec, c1).Value
End If |
Partager