delete item from listcox vba
ListBox1.RemoveItem (ListBox1.ListIndex)
delete item from listcox vba
ListBox1.RemoveItem (ListBox1.ListIndex)
vba collection remove
Sub TestCollection()
' Creation
Dim myCol As New Collection
' Add items
With myCol
.Add "Something"
.Add "Smth before", , 1 ' at first position
myCol.Add "Blue", "color"
.Add Item:=Date, Key:="Now"
Debug.Print myCol.Count ' > 4
' Get items (you can loop through Items collection)
Debug.Print myCol(1) ' > Smth before
Debug.Print myCol("color") ' > Blue
Debug.Print .Item("Now") ' > 26/03/2021
' Delete items
.Remove (1)
.Remove ("color")
' Clear
Set myCol = New Collection
End With
End Sub
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us