Skip to content

Instantly share code, notes, and snippets.

@ndthanh
Created January 20, 2017 11:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ndthanh/4f24e91fd9260ec00b7d4ec793955377 to your computer and use it in GitHub Desktop.
Save ndthanh/4f24e91fd9260ec00b7d4ec793955377 to your computer and use it in GitHub Desktop.
Private Sub LBDMHH_Change()
Dim Id, i
Id = LBDMHH.ListIndex
With Me.LBDMHH
On Error Resume Next
If .Selected(Id) Then
If Not Dic.exists(.List(Id, 0)) Then
Dic.Add .List(Id, 0), .List(Id, 0) & ";" & .List(Id, 1) & ";" & .List(Id, 2) & ";" & .List(Id, 3)
End If
Else
Dic.Remove (.List(Id, 0))
End If
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment