跳到主要內容

如何插入宏按鈕以在Excel中運行宏?

您可以使用Microsoft Excel VBA加載有用的宏。 每次應用宏時,都必須按為此宏設置的鍵盤快捷鍵,或單擊 瀏覽 > > 選擇 適當的宏> 。 您想到了應用宏的簡便方法嗎? 是的,您可以創建一個按鈕以在功能區的QAT或Microsoft Excel的工作區中運行特定的宏。


在當前工作簿的工作區域中插入宏按鈕

本節將介紹有關在當前工作簿的工作區域中插入宏按鈕的詳細教程。

1.首先,顯示 開發者 功能區中的選項卡如下:
(1)在Excel 2010或更高版本中,請單擊 文件 > 選項 > 自定義功能區,請參見以下屏幕截圖。 (查看如何在Excel 2007中)
(2)在右側,檢查 開發者 選項,然後單擊 OK 按鈕。

如果您使用的是Excel 2007,請點擊 辦公按鈕 > Excel選項> 熱門,並檢查 在功能區中顯示“開發人員”選項卡 在選項 使用Excel的主要選項 部分。

2.然後將宏按鈕插入工作區。 請點擊 開發者 > 插入,然後在 表單控件 部分,請參見屏幕截圖:

3.在工作區中繪製一個按鈕。

4.然後彈出“分配宏”對話框,選擇要分配給該內置按鈕的一個宏,然後單擊 OK 按鈕。

現在,該按鈕可以應用宏了。

5.根據需要格式化宏按鈕是可選的。
如果要使宏按鈕易於理解並看起來不錯,可以對其進行格式化。 您可以通過右鍵單擊按鈕來更改按鈕上的文本,更改分配宏,以及使用上下文菜單格式化控制按鈕。

輕鬆一次在Excel中插入多個複選框或選項按鈕

通常,我們一次只能在Excel中執行繁瑣的步驟,一次只能在一個單元格中插入一個複選框或選項按鈕。 但是Kutools for Excel的 批量插入複選框 實用程序和 批量插入選項按鈕 實用程序可幫助Excel用戶快速將多個複選框或選項按鈕插入所有選定的單元格。


廣告插入複選框選項按鈕1

在功能區上的快速訪問工具欄中插入宏按鈕

如果在當前工作簿的工作區中插入宏按鈕,則只能在此工作簿中應用此宏。 但是,如果在功能區上的“快速訪問”工具欄中添加了宏按鈕,則可以在所有工作簿中應用宏。

1。 點擊 箭頭 功能區頂部的按鈕,然後選擇 更多命令… 下拉列表中的項目。 請參見以下屏幕截圖:

2.在“ Excel選項”對話框中,選擇 項目在 選擇命令從 下拉框,請參見以下屏幕截圖;

3.選擇並突出顯示要分配給新按鈕的宏;

4。 點擊 加入 按鈕。

5.現在,選定的宏名稱將添加到右側框中。 在右側框中選擇宏名稱。 請參閱以下屏幕截圖。

6。 點擊 修改 按鈕。

7。 在裡面 修改按鈕 對話框中,選擇一個按鈕符號。

8。 點擊 OK 按鈕。

然後返回功能區中的QAT,您將獲得分配給在宏中選擇的宏的新按鈕。 步驟 3.


演示:在工作表或快速訪問工具欄中插入宏按鈕


Excel的Kutools:超過 300 個方便的工具觸手可及! 立即開始 30 天免費試用,沒有任何功能限制。 現在就下載!

快速從活動工作簿或許多文件夾中的所有工作簿中刪除所有宏

Kutools for Excel為Excel用戶提供了兩種解決方法,可輕鬆刪除工作簿中的所有宏。

  • A. 刪除所有宏:使用此實用程序,只需單擊一下即可刪除活動工作簿中的所有宏。
  • B. 批量刪除所有宏:此實用程序可以從多個文件夾中批量刪除多個工作簿的所有宏,而無需完全打開這些工作簿! 看截圖:
  • 廣告刪除宏1

最佳辦公生產力工具

🤖 Kutools 人工智慧助手:基於以下內容徹底改變數據分析: 智慧執行   |  生成代碼  |  建立自訂公式  |  分析數據並產生圖表  |  呼叫 Kutools 函數...
熱門特色: 尋找、突出顯示或識別重複項   |  刪除空白行   |  合併列或儲存格而不遺失數據   |   沒有公式的回合 ...
超級查詢: 多條件VLookup    多值VLookup  |   跨多個工作表的 VLookup   |   模糊查詢 ....
高級下拉列表: 快速建立下拉列表   |  依賴下拉列表   |  多選下拉列表 ....
欄目經理: 新增特定數量的列  |  移動列  |  切換隱藏列的可見性狀態  |  比較範圍和列 ...
特色功能: 網格焦點   |  設計圖   |   大方程式酒吧    工作簿和工作表管理器   |  資源庫 (自動文字)   |  日期選擇器   |  合併工作表   |  加密/解密單元格    按清單發送電子郵件   |  超級濾鏡   |   特殊過濾器 (過濾粗體/斜體/刪除線...)...
前 15 個工具集12 文本 工具 (添加文本, 刪除字符,...)   |   50+ 圖表 類型 (甘特圖,...)   |   40+ 實用 公式 (根據生日計算年齡,...)   |   19 插入 工具 (插入二維碼, 從路徑插入圖片,...)   |   12 轉化 工具 (數字到單詞, 貨幣兌換,...)   |   7 合併與拆分 工具 (高級合併行, 分裂細胞,...)   |   ... 和更多

使用 Kutools for Excel 增強您的 Excel 技能,體驗前所未有的效率。 Kutools for Excel 提供了 300 多種進階功能來提高生產力並節省時間。  點擊此處獲取您最需要的功能...

產品描述


Office選項卡為Office帶來了選項卡式界面,使您的工作更加輕鬆

  • 在Word,Excel,PowerPoint中啟用選項卡式編輯和閱讀,發布者,Access,Visio和Project。
  • 在同一窗口的新選項卡中而不是在新窗口中打開並創建多個文檔。
  • 將您的工作效率提高 50%,每天為您減少數百次鼠標點擊!

Comments (13)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
It looks like it's easy to do it. If I want to insert a macro, i want to give it this function (click 1 time on it and it turn blue with the comment ON) (click a second time on it and it turn white with comment OFF) How can I do this? tHANKS
This comment was minimized by the moderator on the site
Thanks for these solutions

.
This comment was minimized by the moderator on the site
Hello there, i am interested ebaccdafdaafcbbd
This comment was minimized by the moderator on the site
I have already Macro file and its work properly but its run one by on i just one only one click and run my all Macro automatically.
This comment was minimized by the moderator on the site
Many thanks It is very helpful to start
This comment was minimized by the moderator on the site
How do I determine which macro is associated with a button?
This comment was minimized by the moderator on the site
I want to include individual KU commands in a macro. How can I do that? So far all I can get is Application.Run "'ICD-705.xlsm'!KU" I want to be able to select a command withing KU to execute.
This comment was minimized by the moderator on the site
Hello! I am trying to assign macro to a button but encountered the following error message: Formula is too complex to be assigned to object. What should I do? Best Regards, Olivia Tan
This comment was minimized by the moderator on the site
I have a macro and need to extend the cells that calculate it goes to 245 and i would like ot to go to 1000
This comment was minimized by the moderator on the site
I'm opening an earlier version of Excel in WIN7, Excel 2010. All my macro control buttons are flashing like a marquis. How do I stop this?
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations