From c52667f9a6f1436b590450f70b96b47711af7c85 Mon Sep 17 00:00:00 2001 From: OlimilO1402 Date: Sat, 15 Jun 2024 23:57:23 +0200 Subject: [PATCH] Update MPtr.bas --- Modules/MPtr.bas | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Modules/MPtr.bas b/Modules/MPtr.bas index d0b1c62..698a0d7 100644 --- a/Modules/MPtr.bas +++ b/Modules/MPtr.bas @@ -269,6 +269,15 @@ Try: On Error GoTo Catch Catch: On Error GoTo 0 End Function +Public Sub Col_Remove(Col As Collection, Obj As Object) + Dim o As Object + For Each o In Col + If o.IsSame(Obj) Then 'Object needs Public Function IsSame(other) As Boolean + If Col_Contains(Col, Obj.Key) Then Col.Remove Obj.Key 'Object needs Public Property Key As String + End If + Next +End Sub + Public Sub Col_SwapItems(Col As Collection, ByVal i1 As Long, i2 As Long) Dim c As Long: c = Col.Count If c = 0 Then Exit Sub