Doflamingo
Board Regular
- Joined
- Apr 16, 2019
- Messages
- 238
Hi all,
I have a code that allows me to put in the column B of an Excel sheet all the items displayed in a listbox
Here is the code
But If the items of the listbox change, I would like the new ones be written below the previous ones
I have a code for an empty row, but How to adapt it with the column B ?
Here is the code for empty row
Any ideas ?
I have a code that allows me to put in the column B of an Excel sheet all the items displayed in a listbox
Here is the code
Code:
Sheet9.Activate
For b = 0 To ListBox1.ListCount - 1
With Cells(b + 3, 2)
.ColumnWidth = 15
.Value = ListBox1.List(b)
End With
Next
But If the items of the listbox change, I would like the new ones be written below the previous ones
I have a code for an empty row, but How to adapt it with the column B ?
Here is the code for empty row
Code:
Dim emptyRow As Long
emptyRow = WorksheetFunction.CountA(Range("A:A")) + 1
Cells(emptyRow, 2).Value = ListBox1.Value
Any ideas ?