![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-68.png?w=931)
使用錄製巨集的功能可以減少重複操作同樣設定的時間,加入按鈕之後更可以使整個操作更為簡單!
- 開啟開發人員設定:檔案>其他>選項
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-66.png?w=1024)
打開後選項列會出現下列選單:
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-67.png?w=1024)
2. 錄製巨集:先選取範例表格,點選 開發人員 > 錄製巨集
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-69.png?w=817)
設定巨集名稱,或自由可加入快捷鍵,開始執行動作
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-70.png?w=528)
3. 開始錄製後所有的動作都會被錄進巨集中,包括選取不同表格,設定完後按 停止錄製
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-71.png?w=825)
4. 打開巨集後,可以看到剛剛錄製好的巨集
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-72.png?w=832)
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-73.png?w=610)
按編輯可以看到設定好的程式碼
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-74.png?w=1024)
5. 點選 插入 > 按鈕
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-75.png?w=817)
在空白處劃出按鈕大小後選擇設定好的巨集
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-76.png?w=594)
按鈕點選兩下可以修改名稱
![](https://tingyucho.home.blog/wp-content/uploads/2021/07/image-77.png?w=966)
之後只要點選要改變的其他表格後再按按鈕,就可以有一樣的效果了!