- Код: Выделить всё
select case classname
Case "Class1": set obj = New Class1
Case "Class2": set obj = New Class2
select case classname
Case "Class1": set obj = New Class1
Case "Class2": set obj = New Class2
Declare Function VbaNew Lib "msvbvm60" alias "__vbaNew" (Byval epiClassInfo as long) as object
...
Dim my_obj as object
Set my_obj = VbaNew(...)
my_obj.SomeMethod
...
Set my_obj = Nothing
Сейчас этот форум просматривают: SemrushBot и гости: 12