re
bonjour
c'est normal
regarde ton code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| Private Sub CBoxMateriel_DropButtonClick() ' prend la liste des UM
Dim X As String
Dim LFTS As Object
Dim Cel As Range ' défini les variables
Set LFTS = CreateObject("Scripting.Dictionary") ' créer un répertoire de l'UM
With Sheets("A") ' Prend les informations dans le feuille A
For Each Cel In .Range("C2:C" & .[B1048576].End(xlUp).Row)
X = Cel.Row
If Range(Cells(X, 3), Cells(X, 3)).Value = "FTS" Or Range(Cells(X, 3), Cells(X, 3)).Value = "FTA" Then If Not LFTS.Exists(UCase(Range(Cells(X, 4), Cells(X, 4)).Value)) And Cel.Value <> "" _
Then LFTS.Add UCase(Range(Cells(X, 4), Cells(X, 4)).Value), UCase(Range(Cells(X, 4), Cells(X, 4)).Value)
Next Cel
End With
Me.CBoxMateriel.List = Application.Transpose(LFTS.items)
End Sub |
plus precisément ici, il n'y a pas quelque chose qui te dérange ?
If Range(Cells(X, 3), Cells(X, 3)).Value = "FTS" Or Range(Cells(X, 3), Cells(X, 3)).Value = "FTA" Then If Not LFTS.Exists(UCase(Range(Cells(X, 4), Cells(X, 4)).Value)) And Cel.Value <> "" _ Then LFTS.Add UCase(Range(Cells(X, 4), Cells(X, 4)).Value), UCase(Range(Cells(X, 4), Cells(X, 4)).Value)
Range(Cells(X, 3) c'est le range de quel sheets et les autres ranges aussi d'ailleurs
que met on devant range dans un with sheets(xxxx)?????
le plus etonnant c'est que tu fait bien au depart
For Each Cel In .Range("C2:C" & .[B1048576].End(xlUp).Row)
Partager