Re: Create class for instantiation at runtime
Quote:
Originally Posted by
Elroy
@Tric
Code:
Option Explicit
Private Sub Form_Click()
Dim Obj As Object
Set Obj = CreateTheObject()
Obj(0) = 54
Obj(1) = 20
Debug.Print Obj.Sum
Debug.Print Obj.Diff
Obj.Value(0) = 1231
Obj.Value(1) = 2000
Debug.Print Obj(0)
Debug.Print Obj.Value(1)
Debug.Print Obj.Diff
Set Obj = Nothing
End Sub
Frighteningly, I think I'm beginning to get some basic understandings of this stuff. At least I've managed to not break your code while refactoring. I love not having to worry about the code-order of any of the procedures.
For generalization, I'm thinking of some kind of strided ParamArray. But I haven't worked out all the details just yet.
I'll Be Back,
Elroy
can't run it,why?
Re: Create class for instantiation at runtime
[已更新]DyCOMHelper--让您在VB6下实现真正意义的继承。-CSDN社区
https://bbs.csdn.net/topics/350177926