Webmasters, gagnez de l'argent en affichant des bannières contextuelles Oxado
SourceForge.net Logo
Support This Project Free Downloads
WABAccess Project
Welcome ! [ Home ]  ·  [ Downloads ]  ·  [ Forums ]  ·  [ News ]  ·  [ Documentations ]  
[ Home ]

[ Documentations ]

Deleting a Contact or a Dl

To delete an entry you must use the Remove method of the Elements Collection. You can give either a position index or the identifier of the entry to delete. If the entry does not exist in the collection an error is raised.

Dim objSession




' Delete all entries in the first container
Sub DeleteEntries()
    Dim objContainer, objEntry

    ' get the first container
    Set objContainer = objSession.Containers(1)
    ' parse all the entries in the container
    For Each objEntry In objContainer.Elements
        ' delete the entry
        objContainer.Elements.Remove objEntry.ID
End Sub