Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > Access数据库-模块/函数/VBA

用TypeName方法返回控件标准类型名称

时 间:2012-07-24 11:42:18
作 者:叶海峰   ID:31  城市:广州
摘 要:用TypeName方法返回控件标准类型名称
正 文:

在窗体上建上各种控件,执行代码,立即窗口查看返回的结果.

Private Sub Command25_Click()
    Dim ctl As Control
    For Each ctl In Me.Controls
        Debug.Print ctl.Name, ctl.ControlType, TypeName(ctl)
    Next
End Sub


返回结果:
Check0         106          Checkbox
Label1         100          Label
Option2        105          OptionButton
Label3         100          Label
Frame4         107          OptionGroup
Label5         100          Label
Label6         100          Label
Text7          109          Textbox
Label8         100          Label
PageBreak9     118          PageBreak
Image10        103          Image
Child11        112          SubForm
Label12        100          Label
OLEBound13     108          BoundObjectFrame
Label14        100          Label
OLEUnbound16   114          ObjectFrame
选项卡控件17   123          TabControl
页18           124          Page
页19           124          Page
Line20         102          Line
Box21          101          Rectangle
ListViewCtl2   119          CustomControl
TreeView3      119          CustomControl
DTPicker4      119          CustomControl
Command25      104          CommandButton



Access软件网官方交流QQ群 (群号:483923997)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助