如題,我建了一個集合物件的模組,現在想在模組中加一個Exist的函數,請問該如何加呢?我的集合物件如下:Option Explicit
Private mcolDBTables As New Collection
Public Function Add(strName As String) As dbTable
Dim TableNew As New dbTable
TableNew.Name = strName
mcolDBTables.Add TableNew, strName
Set Add = TableNew
End Function
Public Sub Delete(strName As String)
mcolDBTables.Remove strName
End Sub
Public Function Count() As Long
Count = mcolDBTables.Count
End Function
Public Function Item(strName As String) As dbTable
Set Item = mcolDBTables.Item(strName)
End Function
Public Function NewEnum() As IUnknown
Set NewEnum = mcolplanets.[_NewEnum]
End Function