Yuav Paub
- Qhib Developer tab thiab xaiv Record Macro. Ntxiv ib lub npe thiab shortcut rau macro. Nyob rau hauv lub drop-down, xaiv No Workbook > OK.
- Ib zaug tsim, ua formatting commands rau lub macro tshiab, ces xaiv Stop Recording > File > Save As . Txuag ua ib qho .xlsm file.
- The Tus tsim tawm tab tsis pom los ntawm lub neej ntawd. Txhawm rau pab, qhib Options (PC) lossis Preferences (Mac). Qhib Ribbon nqis, xaiv Developer.
Microsoft Excel qhov kev teeb tsa ntawm daim ntawv nthuav qhia, kev muaj peev xwm ua qauv, thiab cov qauv ua haujlwm tso cai rau koj ua haujlwm rov ua dua. Koj tuaj yeem txhim kho cov haujlwm no ntxiv los ntawm kev siv macros. Kawm paub yuav ua li cas nrog Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, Excel 2010, Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac.
Yuav ua li cas tso saib Tus Tsim Tab hauv Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, thiab Excel 2010
Ua ntej koj ntxiv macros hauv Excel, tso saib tus tsim tawm tab ntawm kab. Los ntawm lub neej ntawd, tus tsim tawm tab tsis pom.
-
Mus rau File tab thiab tom qab ntawd xaiv Options.
-
In the Excel Options dialog box, xaiv Customize Ribbon.
-
In the Customize the Ribbon daim ntawv, mus rau Main Tabs thiab xaiv ntu Developerkos lub thawv.
- Xaiv OK txhawm rau ntxiv tus tsim tawm tab rau lub ribbon.
Yuav ua li cas Tsim Macro hauv Excel rau Microsoft 365, Excel 2019, Excel 2016, Excel 2013, thiab Excel 2010
Thaum koj npaj los tsim macro, pib Excel thiab qhib daim ntawv ua haujlwm.
Macros tsis tuaj yeem tsim lossis khiav hauv Excel Online. Txawm li cas los xij, Excel Online qhib cov ntawv ua haujlwm uas muaj macros. Koj tuaj yeem hloov pauv cov ntawv ua haujlwm thiab txuag cov ntawv ua haujlwm hauv Excel Online yam tsis muaj kev cuam tshuam macros.
- mus rau Tus tsim tawmtab.
-
In the Code pab pawg, xaiv Record Macro.
-
Nyob hauv Macro Lub Npe lub thawv ntawv, sau lub npe piav qhia rau macro.
-
Enter a shortcut key rau macro.
-
Xaiv tus Khaws Macro Hauv nqes xub thiab xaiv Phau Ntawv no.
- Xaiv OK.
-
Ua qhov formatting thiab cov lus txib koj xav kom suav nrog hauv macro.
-
Xaiv Stop Recording thaum koj ua tiav.
-
Mus rau File tab thiab tom qab ntawd xaiv Save As lossis nias F12.
-
In the Txuag As dialog box, sau ib lub npe ntaub ntawv rau phau ntawv ua haujlwm.
-
Xaiv tus Txuag raws li Hom poob xub, xaiv Excel Macro-Enabled Workbook thiab tom qab ntawd xaiv Txuag.
Yuav ua li cas tso saib Tus Tsim Tab hauv Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac
Ua ntej koj ntxiv macros hauv Excel rau Microsoft 365 rau Mac lossis hauv Excel 2019 lossis 2016 ntawm Mac, tso saib Tus Tsim tawm tab ntawm kab. Los ntawm lub neej ntawd, tus tsim tawm tab tsis pom.
-
Mus rau Excel thiab xaiv Preferences.
-
Xaiv Ribbon & Toolbar.
-
In the Customize the Ribbon, mus rau ntu Main Tabs thiab xaiv cov Developerkos lub thawv.
- Xaiv Save.
Yuav ua li cas Tsim Macro hauv Excel rau Microsoft 365 rau Mac, Excel 2019 rau Mac, thiab Excel 2016 rau Mac
Thaum koj npaj los tsim macro, pib Excel thiab qhib daim ntawv ua haujlwm.
- mus rau Tus tsim tawmtab.
-
In the Code pab pawg, xaiv Record Macro.
- Nyob hauv Macro Name lub thawv ntawv, sau lub npe rau macro.
- Nyob hauv Shortcut key lub thawv ntawv, ntaus tus ntawv me lossis ntawv loj uas koj xav siv.
-
Xaiv tus Kho macro hauv poob xub thiab xaiv Phau Ntawv no.
- Xaiv OK.
- Ua qhov formatting thiab cov lus txib koj xav kom suav nrog hauv macro.
- Thaum koj ua tiav, mus rau Developer tab thiab xaiv Stop Recording.
-
Mus rau File tab thiab xaiv Save As los yog, nias Shift+ Command+ S
- Nyob hauv Save As dialog box, sau ib lub npe ntaub ntawv rau phau ntawv ua haujlwm.
-
Xaiv lub File Format poob xub, xaiv Excel Macro-Enabled Workbook (.xlsm). Ces xaiv Save.
Yuav ua li cas khiav Macro
Thaum koj xav khiav macro koj tsim hauv Excel, siv qhov shortcut koj muab rau macro lossis khiav macro los ntawm Developer tab.
Txhawm rau khiav macro siv tus yuam sij shortcut ua ke, qhib daim ntawv ua haujlwm uas muaj cov macro. Nkag mus lossis xaiv cov ntaub ntawv uas koj xav siv cov formatting lossis cov lus txib suav nrog hauv macro. Tom qab ntawd, nias qhov tseem ceeb ua ke muab rau macro.
Txhawm rau khiav macro los ntawm Developer Tab, qhib daim ntawv ua haujlwm uas muaj cov macro, tom qab ntawd ua raws cov kauj ruam no:
- Hauv Excel, sau cov ntaub ntawv uas koj xav siv cov formatting lossis cov lus txib uas koj suav nrog hauv macro.
-
mus rau Tus tsim tawmtab.
-
In the Code pawg, xaiv Macros.
-
Nyob hauv Macro dialog box, xaiv lub npe muab rau lub macro, ces xaiv Run.
How to Change the Macro Shortcut Key
Txhawm rau ntxiv lossis hloov tus yuam sij shortcut rau macro:
- mus rau Tus tsim tawmtab.
- In the Code pawg, xaiv Macros.
- Nyob rau hauv Macros dialog box, xaiv lub npe ntawm macro uas koj xav muab los yog hloov cov yuam sij shortcut ua ke.
- Xaiv Options.
- Nyob hauv Macro Options dialog box, mus rau Shortcut key ntawv lub thawv, ntaus tus ntawv me lossis ntawv loj los siv rau ua ke shortcut, thiab ces xaiv OK.