谢谢楼主提供这么好的学习资源!其中的多级菜单能不能用模块来调用呢? 改了以下的代码,就是通不过,还请帮忙修改,谢谢! Public Sub ZidimgYiCaiDang() '自定义菜单模块 Set XiTong = CommandBars("WorkSheet Menu Bar").Controls.Add With XiTong .Caption = "系统(&X)" Call MyMenu("保存(&S)", True, "BaoCun", 1975) Call MyMenu("备份(&C)", True, "SaveCopyAs", 271) Call MyMenu("退出(&X)", True, "TueiCu", 232) .BeginGroup = True End With End Sub
Public Sub MyMenu(YCaption As String, YBeginGroup As String, YOnAction As String, YFaceId As String) Set MyCtrl = CommandBars("WorkSheet Menu Bar").Controls.Add With MyCtrl .Caption = YCaption .BeginGroup = YBeginGroup .OnAction = YOnAction .FaceId = YFaceId End With End Sub
TB2ToQll.rar
(10.34 KB, 下载次数: 125)
[此贴子已经被作者于2007-5-17 18:42:00编辑过] |