新建Setcbar=CommandBars("File").Controls("新建(&N)")cbar.Enabled=Falsecbar.OnAction="NullMethod"cbar.ShortcutText=""'cbar.Reset'菜單>打開Setcbar=Comma" />

日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

VBA訪問word菜單

系統 2027 0

?

Sub ?SetCommandbar()
????????????
'
???????? ' ?SetCommandbar?Macro
???????? ' ?宏在?2007-2-1?由?創建
???????? '
???????? ' 菜單
???????? ' 菜單
???????? Dim ?cbar?? As ?CommandBarButton

??????????????????????
' 菜單>新建
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 新建(&N) " )
????????????cbar.Enabled?
= ? False
???????????????????????????????cbar.OnAction?
= ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 菜單>打開
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 打開(&O) " )
????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 菜單>保存
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 保存(&S) " )
????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 菜單>另存為
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 另存為(&A) " )
????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 命令>新建
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( 1 )
????????????cbar.Visible?
= ? True
???????????????????????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 命令>打開
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( " 打開(&O) " )
????????????cbar.Visible?
= ? True
???????????????????????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset
???????? ' 命令>保存
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( " 保存(&S) " )
????????????cbar.Visible?
= ? True
???????????????????????????????cbar.Enabled?
= ? False ? '
????????cbar.OnAction? = ? " NullMethod "
????????cbar.ShortcutText?
= ? ""
????????
' cbar.Reset


????????
' CommandBars("Standard").Controls(1).ShortcutText?=?""



????????
' 快捷鍵Ctrl+N?和Ctrl+O
???????? ' Set?cbar?=?CommandBars.ActionControl
???????? Set ?myControl? = ?Application.CommandBars.FindControl?_
????????????????????????????????????????????????????????????????(Type:
= msoControlPopup,?Visible: = True )



????????
End?Sub

????????????
Private ? Sub ?NullMethod()

????????????????????????????
End?Sub

????????????????????????????????
Sub ?myreset()
????????????????????????????????????
' 菜單
???????? Dim ?cbar?? As ?CommandBarButton

??????????????????????
' 菜單>新建
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 新建(&N) " )
????????????cbar.Reset
????????????????
' 菜單>打開
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 打開(&O) " )
????????????cbar.Reset
????????????????
' 菜單>保存
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 保存(&S) " )
????????????cbar.Reset
????????????????
' 菜單>另存為
???????? Set ?cbar? = ?CommandBars( " File " ).Controls( " 另存為(&A) " )
????????????cbar.Reset
????????????????
' 命令>新建
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( 1 )
????????????cbar.Reset
????????????????
' 命令>打開
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( " 打開(&O) " )
????????????cbar.Reset
????????????????
' 命令>保存
???????? Set ?cbar? = ?CommandBars( " Standard " ).Controls( " 保存(&S) " )
????????????cbar.Reset
????????????????
End?Sub
????????????????????????
Sub ?aaa()

????????????????????????????????
' ?aaa?Macro
???????? ' ?宏在?2007-2-2?由?張文璋?創建
???????? '

????????
End?Sub

VBA訪問word菜單


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 普洱| 彭泽县| 土默特左旗| 平湖市| 梨树县| 鱼台县| 海兴县| 丰县| 金秀| 时尚| 上思县| 辽阳县| 本溪| 贵溪市| 基隆市| 昭平县| 扬中市| 勐海县| 兴安盟| 凯里市| 古交市| 泰州市| 亳州市| 尉氏县| 玉溪市| 读书| 瑞昌市| 宣汉县| 怀远县| 桐城市| 青田县| 海淀区| 大石桥市| 海伦市| 松桃| 易门县| 开封县| 祁连县| 巫溪县| 德惠市| 重庆市|