'exemple pour un tableau structué
Private Sub UserForm_Activate()
Dim rngHeader As Range 'meme pour un tableau structuré!!!!!!!!!!
Set rngHeader = Range("tableau1[#headers]")
initListviewHeader rngHeader
End Sub
Function initListviewHeader(rngHeader As Range)
ligneheader = rngHeader.Value
With ListView1
For col = 1 To UBound(ligneheader, 2)
.ColumnHeaders.Add , , ligneheader(1, col), rngHeader(1, col).Width
Next
'option
.Gridlines = True: .BorderStyle = ccFixedSingle: .FullRowSelect = True: .View = lvwReport
End With
End Function