如何使用VBA在多列列表框中隐藏列

我正在使用2维数组将数据加载到多列列表框中。

我想隐藏一个特定的列,但不知道如何。 我不能排除数据 – 因为我想稍后将其作为隐藏的列引用 – 但我不希望用户看到它。

这是我到目前为止:

For x = 0 To UBound(ReturnArray, 2) NISSLIST.ListBox1.Clear 'Make sure the Listbox is empty NISSLIST.ListBox1.ColumnCount = UBound(ReturnArray, 1) 'Set the number of columns 'Fill the Listbox NISSLIST.ListBox1.AddItem x 'Additem creates a new row For y = 0 To UBound(ReturnArray, 1) NISSLIST.ListBox1.LIST(x, y) = ReturnArray(y, x) 'List(x,y) X is the row number, Y the column number If y = 3 Then 'Want to hide this column in listbox NISSLIST.ListBox1.NOIDEA '<<< HELP HERE <<<, What do I put to hide this column of my multi-column listbox???? End If Next y Next x 

通过MSDN NISSLIST.ListBox1.Column(x,3).ColumnHidden=-1