【发布时间】:2010-09-08 07:20:24
【问题描述】:
VB6运行时如何获取Object的Type(字符串形式即可)?
即类似:
If Typeof(foobar) = "CommandButton" Then ...
/EDIT: 澄清一下,我需要检查动态类型对象。一个例子:
Dim y As Object
Set y = CreateObject("SomeType")
Debug.Print( <The type name of> y)
输出将是“CommandButton”
【问题讨论】: