Excel VBA ListBox Functions with Examples
Автор: EXCEL'N CRICKET (Jithin R Trivandrum)
Загружено: 2020-08-24
Просмотров: 98
Excel VBA ListBox Functions. How to input our items inside a list box and how to display the selected items in our sheets.
Private Sub ListBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
If KeyCode = 13 Then
For i = 0 To ListBox1.ListCount - 1
x = sheets("Master").Range("C" & Rows.Count).End(xlUp).Row + 1
If Me.ListBox1.Selected(i) Then
sheets("Master").Range("C" & x).Value = Me.ListBox1.List(i, 0)
End If
Next
End If
End Sub
Private Sub UserForm_Initialize()
x = sheets("Master").Range("A" & Rows.Count).End(xlUp).Row
Me.ListBox1.List = sheets("Master").Range("A2:A" & x).Value
End Sub
Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: