Public Function RetrieveCollection() As Collection
Dim objCustomUtil As Object
Set objCustomUtil = CreateObject("Customer.Class")
Set RetrieveCollection = objCustomUtil.RetrieveCollection
End Function
Dim objCustomUtil As Object
Set objCustomUtil = CreateObject("Customer.Class")
Set RetrieveCollection = objCustomUtil.RetrieveCollection
End Function
Dim objCustomUtil As Object
Set objCustomUtil = CreateObject("Customer.Class")
Set RetrieveCollection = objCustomUtil.RetrieveCollection
Set objCustomUtil = Nothing
End Function
Dim objCustomUtil As Object
Set objCustomUtil = CreateObject("Customer.Class")
Call RetrieveCollection.add(ObjCustomUtil.RetrieveCollection,StrKey)End Function
Dim objCustomUtil As Object
Dim objCustomUtilCH As Object 'ObjCustomUtil.RetrieveCollection 中的元素Set objCustomUtil = CreateObject("Customer.Class")
For Each objCustomUtilCHIn ObjCustomUtil.RetrieveCollection
Call RetrieveCollection.addObjCustomUtil.RetrieveCollection,StrKey)
NextEnd Function
当时老外并没说在哪个环境下,在VB6里 zmcpu(你不帮我谁帮我?)的做法是必须的,不过在VB7里不需要加 Set