![]() |
|
|
The final CodeThe ValidateConsumedItems function will check if each item that is stored
in the collection exists, if it does not exist it will be removed from the
collection. '--------------------------------------------------------------------------------------- ' Procedure : ValidateConsumedItems ' DateTime : 01-04-2003 17:45 ' Author : ' Purpose : validates the existence in disk of the items in the collection '--------------------------------------------------------------------------------------- ' Public Function ValidateConsumedItems() Dim tempobj As Variant For Each tempobj In ConsumedItems If FileOrFolderExists(tempobj) = False Then ConsumedItems.Remove ConsumedItems.Item(tempobj) End If Next End Function The function FileOrFolderExists checks if a file or folder exits in disk.
In the class initialize event we create the collection witch will hold
the file or folder Private Sub Class_Initialize() Set ConsumedItems = New Collection End Sub Private Sub Class_Terminate() Set ConsumedItems = Nothing End Sub
|
|
|
Page Last Updated: 02-07-2003 |