返回列表 上一主題 發帖

[發問] 請教 ListBox1.List 之Column疑問?

[發問] 請教 ListBox1.List 之Column疑問?

請教大大
        Set d = CreateObject("Scripting.Dictionary")
                  With Sheets("基本資料")
                      For Each a In .Range(.Cells(2, 4), .Cells(65536, 4).End(xlUp))
                          d(a & "") = Array(a.Value, a.Offset(, -3).Value, a.Offset(, -2).Value)
                      Next
                 End With
       If d.Count = 0 Then Exit Sub
    ListBox1.Visible = True
    ListBox1.List = ?????
1.應如何寫   才能將  Array(a.Offset(, -3).Value, a.Offset(, -2).Value)之內容
   呈現於ListBox1(columncount=3)內且分出3個 column
2.cells(1,1)= 需要得到 ListBox1.column(1)之Data
   cells(1,2)=  需要得到ListBox1.column(2)之Data
   應如何寫
3.當無須ListBox1存在 如何使ListBox1.Visible = False 當focus在其他controls時
   謝謝指導

感激 Hsieh 版大
   完全解決問題所在  謝了
1.學到了 .List(.ListIndex, i - 1)
2..學會  . List = Application.Transpose(Application.Transpose(d.items))
3.請教何狀況下可用. List = d.items ?

TOP

        靜思自在 : 要用心,不要操心、煩心。
返回列表 上一主題