设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

返回列表 发新帖
查看: 1467|回复: 6
打印 上一主题 下一主题

[帮助] 【求助】 变量定义的问题

[复制链接]

点击这里给我发消息

1#
发表于 2011-11-16 15:31:31 | 显示全部楼层
把 CommandBar 这些对象用 Object 代替,msoBarPopup 这些常数用实际数值代替就可以了。

   Dim iBar As Object  'CommandBar
    Dim iButton As Object  'CommandBarButton
    Dim iCombo As Object  'CommandBarComboBox
    Set iBar = Application.CommandBars.Add(Name:=("menuTreeView"), Position:=5, Temporary:=True)
    With iBar
        Set iButton = .Controls.Add(Type:=1)
        iButton.Caption = "增加  选定节点子节点(&A)"
        iButton.OnAction = "Get_PopupMenuSelection"
        iButton.Tag = "ADD"
        iButton.FaceId = 240
    End With
您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-5-18 06:20 , Processed in 0.137911 second(s), 23 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表