Medley RedimList

Bonjour à tous,

Bonjour MFerrand,

Bonjour GMB

Vous m'avez donné des codes qui fonctionnent bien.

Mais voilà j'aimerai faire un medley de vos 2 codes pour en avoir un seul qui permet d'un c^té de prendre en compte les décimales et de l'autre avoir la possibilité de faire bouger les textbox

Controls("TextBox" & i).Top = .Top + .Height + 9

Sub RedimList2()
Dim T(), dln%, i%, j%
    With ActiveSheet
        dln = .Range("B" & .Rows.Count).End(xlUp).Row
        ReDim T(dln - 2, 6)
        With .Range("B2:H" & dln)
            For i = 1 To dln - 1
                For j = 1 To 7
                    T(i - 1, j - 1) = .Cells(i, j).Text
                Next j
            Next i
        End With
    End With
    With ListBox1
        .Height = ((dln - 1) * 125 + 110) / 9
        .List = T
        For i = 1 To 2
          Controls("TextBox" & i).Top = .Top + .Height + 9
        Next i
    End With
End Sub

et

ListBox1.Column(i, j) = Format(ListBox1.Column(i, j), "0.00")

Sub RedimList()
Dim derln As Integer
    derln = Range("B" & Rows.Count).End(xlUp).Row
    With Fact.ListBox1
        .Height = ((derln - 1) * 125 + 110) / 9
        .List = Range("B2:H" & derln).Value
    End With

    For j = 0 To Fact.ListBox1.ListCount - 1
        For i = 1 To 6
          ListBox1.Column(i, j) = Format(ListBox1.Column(i, j), "0.00")
        Next i
    Next j
End Su

b

Merci d'avance

Amicalement

Noel

Rechercher des sujets similaires à "medley redimlist"