Learn Excel - Video 176 - VBA- Export multiple values of ListBox

preview_player
Показать описание
Unleashing the power of Collection Loops in USER FORM Controls. Must watch for you
Рекомендации по теме
Комментарии
Автор

Sir I wrote the Below Code to export the Data in A & B column, no need to do Transpose.
Dim Ctr As Control

Dim J, K As Long
J = 1
K = 1

For Each Ctr In Me.Controls
If Ctr.Name Like "LST" & "*" Then
For X = 0 To Ctr.ListCount - 1
Sheets("Sheet2").Cells(J, K) = Ctr.List(X)
J = J + 1
Next
J = 1
K = K + 1
Else
End If

Next

End sub

anandgp
join shbcf.ru