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

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

VBA訪問word菜單

系統 2050 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條評論
主站蜘蛛池模板: 宕昌县| 鄂托克旗| 铁岭县| 乌鲁木齐县| 洛南县| 安龙县| 济南市| 靖宇县| 湖北省| 闽清县| 郧西县| 隆尧县| 寻甸| 葵青区| 望谟县| 彭泽县| 五寨县| 乐山市| 阿克苏市| 象州县| 彰化县| 罗山县| 腾冲县| 安国市| 达尔| 曲周县| 巨鹿县| 油尖旺区| 大厂| 潼南县| 红河县| 新闻| 白沙| 洛南县| 郧西县| 酉阳| 荣成市| 靖宇县| 营山县| 宽城| 芜湖县|