版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、Static Sub AddMenu() '添加自定义菜单Dim NewMenuBar As CommandBarDim CX As CommandBarControl, JC As CommandBarControl, TB As CommandBarControl, SJ As CommandBarControl, BF As CommandBarControlDim DY As CommandBarControl, BZ As CommandBarControl, XX As CommandBarControl, USE As CommandBarControl, WH As C
2、ommandBarControlDim CW As CommandBarControl, TJ As CommandBarControl, LJC As CommandBarControl, YZ2 As CommandBarControl, YJC As CommandBarControlDim LDQ As CommandBarControl, LNB As CommandBarControl, SDQ As CommandBarControl, SNB As CommandBarControl, LAll As CommandBarControlDim JSB As CommandBar
3、Control, SAll As CommandBarControl, DDQ As CommandBarControl, DNB As CommandBarControl, CDQ As CommandBarControlDim CNB As CommandBarControl, C0 As CommandBarControl, CTZ As CommandBarControl, BF1 As CommandBarControl, BF2 As CommandBarControlDim BF8 As CommandBarControl, DY1 As CommandBarControl, D
4、Y2 As CommandBarControl, SM As CommandBarControl, FG As CommandBarControlDim KK As CommandBarControl, Bh1 As CommandBarControl, Bh2 As CommandBarControl, JB1 As CommandBarControl, JB2 As CommandBarControlDim KB As CommandBarControl, FZ As CommandBarControl, SY As CommandBarControl, CZ As CommandBarC
5、ontrol, Z1 As CommandBarControlDim Z2 As CommandBarControl, NH As CommandBarControl, B1 As CommandBarControl, B2 As CommandBarControl, B3 As CommandBarControl, BD As CommandBarControlDim B5 As CommandBarControl, B6 As CommandBarControl, S1 As CommandBarControl, S2 As CommandBarControl, S3 As Command
6、BarControlDim S5 As CommandBarControl, S6 As CommandBarControl, D1 As CommandBarControl, D2 As CommandBarControl, D3 As CommandBarControlDim D5 As CommandBarControl, D6 As CommandBarControl, C1 As CommandBarControl, C2 As CommandBarControl, C3 As CommandBarControlDim C5 As CommandBarControl, C6 As C
7、ommandBarControl, TJF As CommandBarControl, TL As CommandBarControl, CL As CommandBarControlDim ClCells As CommandBarControl, ShHL As CommandBarControl Application.ScreenUpdating = False On Error Resume Next MenuBars("MyMenuBar"
8、).Delete '定义菜单 Set NewMenuBar = CommandBars.Add(MenuBar:=True) NewMenuBar.Name = "MyMenuBar" NewMenuBar.Visible = True '定义一级菜单项 Set CX = NewMenuBa
9、r.Controls.Add(Type:=msoControlPopup) CX.Caption = "程序设置" CX.Visible = True Set JC = NewMenuBar.Controls.Add(Type:=msoControlPopup) JC.Caption = "基础数据"
10、; JC.Visible = True Set TB = NewMenuBar.Controls.Add(Type:=msoControlPopup) TB.Caption = "报表审录" TB.Visible = True Set SJ = NewMenuBar.Controls.Add(Type:=msoCon
11、trolPopup) SJ.Caption = "数据处理" SJ.Visible = True Set BF = NewMenuBar.Controls.Add(Type:=msoControlPopup) BF.Caption = "报表备份"
12、 BF.Visible = True Set DY = NewMenuBar.Controls.Add(Type:=msoControlPopup) DY.Caption = "打印控制" DY.Visible = True Set BZ = NewMenuBar.Controls.Add(Type:=msoControlPopup)
13、0; BZ.Caption = "帮助信息" BZ.Visible = True '定义二级菜单项 Set XX = CX.Controls.Add(Type:=msoControlButton) With XX
14、0; .Caption = "企业信息" .OnAction = "ShowXX" .FaceId = 1016 End With Set USE = CX.Controls.A
15、dd(Type:=msoControlButton) With USE .Caption = "操作设定" .OnAction = "UserSet" .FaceId = 1980
16、 End With Set TIM = CX.Controls.Add(Type:=msoControlButton) With TIM .Caption = "报表时期"
17、160; .OnAction = "ChangeMonth" .BeginGroup = True '菜单选项之间的分隔线 End With Set WH = CX.Controls.Add(Type:=msoControlPopup) With WH
18、60; .Caption = "报表维护" .BeginGroup = True '菜单选项之间的分隔线 End With Set CW = JC.Controls.Add(Type:=msoCon
19、trolPopup) With CW .Caption = "财务报表" End With Set TJ = JC.Controls.Add(Type:=msoControlPopup)
20、 With TJ .Caption = "统计数据" End With Set LJC = JC.Controls.Add(Type:=msoControlButton) With LJC
21、 .Caption = "基础数据综合录入" .BeginGroup = True '菜单选项之间的分隔线 .OnAction = "ShowJC" .FaceId = 353
22、60; End With Set YZ2 = JC.Controls.Add(Type:=msoControlButton) With YZ2 .Caption = "增表二数据套用" .BeginGroup = True
23、39;菜单选项之间的分隔线 .OnAction = "CountZ1" .FaceId = 211 End With Set YJC = JC.Controls.Add(Type:=msoControlButton)
24、0; With YJC .Caption = "基础数据导入主表" .BeginGroup = True '菜单选项之间的分隔线 .OnAction = "CountJC"
25、 .FaceId = 938 End With Set LDQ = TB.Controls.Add(Type:=msoControlPopup) With LDQ .Caption = "录入定期报表"
26、 End With Set LNB = TB.Controls.Add(Type:=msoControlButton) With LNB .Caption = "录入年报报表" .OnAct
27、ion = "ShowNB" '无 .FaceId = 162 End With Set SDQ = TB.Controls.Add(Type:=msoControlPopup) With SDQ
28、0; .Caption = "定期报表审核" .BeginGroup = True '菜单选项之间的分隔线 End With Set SNB = TB.Controls.Add(Type:=msoControlButton)
29、60;With SNB .Caption = "年报报表审核" .OnAction = "CheckNB" .FaceId = 172 End With
30、Set JSB = TB.Controls.Add(Type:=msoControlButton) With JSB .Caption = "表间数据计算" .OnAction = "CountBB"
31、160; .FaceId = 283 .BeginGroup = True '菜单选项之间的分隔线 End With Set LAll = TB.Controls.Add(Type:=msoControlButton) With LAll
32、 .Caption = "当期报表通录" .BeginGroup = True '菜单选项之间的分隔线 .OnAction = "ShowBB" .FaceId = 212
33、 End With Set SAll = TB.Controls.Add(Type:=msoControlButton) With SAll .Caption = "当期报表全审" .OnAction = "CheckBB&quo
34、t; .FaceId = 790 .BeginGroup = True '菜单选项之间的分隔线 End With Set DDQ = SJ.Controls.Add(Type:=msoControlPopup) W
35、ith DDQ .Caption = "定期数据导入" End With Set DNB = SJ.Controls.Add(Type:=msoControlButton) With DNB
36、 .Caption = "年报数据导入" .OnAction = "InNB" .FaceId = 237 End With Set CDQ = SJ.Controls.Add(Type:=m
37、soControlPopup) With CDQ .Caption = "生成定期数据" .BeginGroup = True '菜单选项之间的分隔线 End With Set CNB = SJ
38、.Controls.Add(Type:=msoControlButton) With CNB .Caption = "生成年报报表数据" .FaceId = 762 .OnAction = "
39、;OutNB" End With Set C0 = SJ.Controls.Add(Type:=msoControlButton) With C0 .Caption = "生成全部数据"
40、60; .FaceId = 721 .OnAction = "OutAll" .BeginGroup = True '菜单选项之间的分隔线 End With Set CTZ = SJ.Controls.A
41、dd(Type:=msoControlButton) With CTZ .Caption = "生成统计台账" .FaceId = 222 .OnAction = "OutTZ"&
42、#160; End With Set BF1 = BF.Controls.Add(Type:=msoControlButton) With BF1 .Caption = "备份定期报表" .FaceId = 356
43、 .OnAction = "Copy1" End With Set BF2 = BF.Controls.Add(Type:=msoControlButton) With BF2 .Caption = &
44、quot;备份年报套表" .FaceId = 1665 .OnAction = "Copy2" End With Set BF8 = BF.Controls.Add(Type:=msoControlButton) &
45、#160; With BF8 .Caption = "程序数据表转存" .FaceId = 749 .OnAction = "CopyAll"
46、;.BeginGroup = True '菜单选项之间的分隔线 If Man = 0 Then .Enabled = False End If End With Set DY0 = DY
47、.Controls.Add(Type:=msoControlButton) With DY0 .Caption = "预览调整" .FaceId = 25 .OnAction = "Prin
48、t0" End With Set DY1 = DY.Controls.Add(Type:=msoControlButton) With DY1 .Caption = "打印当前报表"
49、; .FaceId = 4 .OnAction = "Print1" End With Set SM = BZ.Controls.Add(Type:=msoControlButton) &
50、#160; With SM .Caption = "程序说明" .FaceId = 984 .OnAction = "Help" End With
51、; Set FG = BZ.Controls.Add(Type:=msoControlPopup) With FG .Caption = "统计法规参考" .BeginGroup = True '菜单选项之间的分隔线&
52、#160; End With Set BB = BZ.Controls.Add(Type:=msoControlButton) With BB .Caption = "程序版本信息" &
53、#160; .OnAction = "ShowKK" .FaceId = 809 .BeginGroup = True '菜单选项之间的分隔线 End With '定义三级菜单项 Set JB1 = WH.Controls.Add(Type:=ms
54、oControlButton) With JB1 .Caption = "工作表解锁" .FaceId = 916 .OnAction = "JB1"
55、160; End With Set Bh1 = WH.Controls.Add(Type:=msoControlButton) With Bh1 .Caption = "锁定工作表" .FaceId = 894
56、160; .OnAction = "Bh1" End With Set JB2 = WH.Controls.Add(Type:=msoControlButton) With JB2 .Caption = "工作簿解锁"&
57、#160; .FaceId = 719 .OnAction = "JB2" .BeginGroup = True '菜单选项之间的分隔线 If Man = 0 Then
58、0; .Enabled = False End If End With Set Bh2 = WH.Controls.Add(Type:=msoControlButton)
59、; With Bh2 .Caption = "锁定工作簿" .FaceId = 718 .OnAction = "Bh2" If Man =
60、0 Then .Enabled = False End If End With Set DelCell = WH.Controls.Add(Type:=msoControlButton) With DelCell
61、; .Caption = "清除本月表内数据" .FaceId = 20 .OnAction = "Clear1" .BeginGroup = True
62、 '分隔线 End With Set ClCells = WH.Controls.Add(Type:=msoControlButton) With ClCells .Caption = "清除本表所有数据"
63、160; .OnAction = "ClearAll" If Man = 0 Then .Enabled = False End If
64、; End With Set SHL = WH.Controls.Add(Type:=msoControlButton) With SHL .Caption = "行列编辑信息" .FaceId = 11
65、0; .OnAction = "ShowRC" .BeginGroup = True '分隔线 If Man = 0 Then .Enabled = False
66、0; End If End With Set KB = WH.Controls.Add(Type:=msoControlButton) With KB .Caption = "查阅所有表"
67、 .FaceId = 8 .OnAction = "ShowAll" .BeginGroup = True '分隔线 If Man = 0 Then
68、60; .Enabled = False End If End With Set FZ = CW.Controls.Add(Type:=msoControlButton) With FZ
69、; .Caption = "资产负债表" .FaceId = 133 .OnAction = "ShowFZ" End With Set SY = CW.Controls.Add(Type:=msoControlBut
70、ton) With SY .Caption = "损益(利润)表" .FaceId = 136 .OnAction = "ShowSY"
71、160; End With Set CZ = TJ.Controls.Add(Type:=msoControlButton) With CZ .Caption = "总产值计算表" .FaceId = 17
72、0; .OnAction = "ShowCZ" .BeginGroup = True '分隔线 End With Set Z1 = TJ.Controls.Add(Type:=msoControlButton) With Z
73、1 .Caption = "增加值计算表一" .FaceId = 144 .OnAction = "ShowZ1" End With Set Z2 = T
74、J.Controls.Add(Type:=msoControlButton) With Z2 .Caption = "增加值计算表二" .FaceId = 144 .OnAction = "
75、ShowZ2" End With Set NH = TJ.Controls.Add(Type:=msoControlButton) With NH .Caption = "能耗记录表" .Fa
76、ceId = 107 .OnAction = "ShowNH" End With Set B1 = LDQ.Controls.Add(Type:=msoControlButton) With B1 .C
77、aption = "B201表" .FaceId = 483 .OnAction = "Show201" End With Set B2 = LDQ.Controls.Add(Type:=msoControlButton)
78、0; With B2 .Caption = "B202表" .FaceId = 481 .OnAction = "Show202" End Wi
79、th Set B3 = LDQ.Controls.Add(Type:=msoControlButton) With B3 .Caption = "B203表" .FaceId = 484
80、 .OnAction = "Show203" .BeginGroup = True '分隔线 End With Set B5 = LDQ.Controls.Add(Type:=msoControlButton) With B5
81、; .Caption = "P205表" .FaceId = 482 .OnAction = "Show205" End With Set B6 = LDQ.Controls.Add(Type
82、:=msoControlButton) With B6 .Caption = "P206表" .FaceId = 59 .OnAction = "Show206"
83、160; .BeginGroup = True '分隔线 End With Set BD = LDQ.Controls.Add(Type:=msoControlButton) With BD .Caption = &q
84、uot;乡企定综1表" .FaceId = 1763 .OnAction = "ShowD1" .BeginGroup = True '分隔线 End With
85、 Set S1 = SDQ.Controls.Add(Type:=msoControlButton) With S1 .Caption = "B201表" .FaceId = 329 &
86、#160;.OnAction = "Check201" End With Set S2 = SDQ.Controls.Add(Type:=msoControlButton) With S2 .Caption = "B202表"
87、60; .OnAction = "Check202" End With Set S3 = SDQ.Controls.Add(Type:=msoControlButton) With S3 .Caption = "B203表"
88、0; .FaceId = 107 .OnAction = "Check203" .BeginGroup = True '分隔线 End With Set S5 = SDQ
89、.Controls.Add(Type:=msoControlButton) With S5 .Caption = "P205表" .OnAction = "Check205" End With &
90、#160; Set S6 = SDQ.Controls.Add(Type:=msoControlButton) With S6 .Caption = "P206表" .FaceId = 1715 .O
91、nAction = "Check206" .BeginGroup = True '分隔线 End With Set D1 = DDQ.Controls.Add(Type:=msoControlButton) With D1
92、 .Caption = "B201表" .FaceId = 239 .OnAction = "In201" .BeginGroup = True '分隔线
93、60; End With Set D2 = DDQ.Controls.Add(Type:=msoControlButton) With D2 .Caption = "B202表" .OnAction = "In202&
94、quot; .BeginGroup = True '分隔线 End With Set D3 = DDQ.Controls.Add(Type:=msoControlButton) With D3
95、;.Caption = "P203表" .FaceId = 317 .OnAction = "In203" .BeginGroup = True '分隔线
96、60;End With Set D5 = DDQ.Controls.Add(Type:=msoControlButton) With D5 .Caption = "P205表" .OnAction = "In205"
97、 End With Set D6 = DDQ.Controls.Add(Type:=msoControlButton) With D6 .Caption = "P206表" .FaceId = 271 &
98、#160; .OnAction = "In206" .BeginGroup = True '分隔线 End With Set C1 = CDQ.Controls.Add(Type:=msoControlButton) With C1
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 一周学习计划参考范本
- -物流年终工作总结
- 初中教师工作总结-15篇
- 收银员的年度工作总结
- 历史教师年度考核工作总结
- 财务类实习报告模板锦集9篇
- 野生金银花人工驯化繁育中心建设可行性研究报告
- 冀教版三起四年级英语上册Unit 4 Lesson 22课件正式版
- 《市场经济运作原理》课件
- 《电机总复习习题全》课件
- 办公家具无偿租赁合同
- 《基金营销分析》课件
- 《AEFI有关法规要求》课件
- 颈部手术麻醉
- 农民个人收入证明(5篇)
- 英语演讲技巧与实训学习通超星期末考试答案章节答案2024年
- 金属冶炼安全金属冶炼安全事故案例与防范考核试卷
- 2024电力安全工器具及小型施工机具预防性试验规程
- 《预防未成年人犯罪》课件(图文)
- 2024年印刷厂管理规章制度范例(三篇)
- 大国外交演讲与辩论智慧树知到期末考试答案章节答案2024年中国石油大学(华东)
评论
0/150
提交评论