{"id":46,"date":"2023-11-18T00:56:48","date_gmt":"2023-11-18T00:56:48","guid":{"rendered":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/"},"modified":"2023-12-10T11:45:11","modified_gmt":"2023-12-10T11:45:11","slug":"%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98","status":"publish","type":"page","link":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/","title":{"rendered":"Vba\u9762\u8bd5\u95ee\u9898"},"content":{"rendered":"<div class=\"excel-\" id=\"excel-1537127092\"><script type=\"text\/javascript\">\r\n\tatOptions = {\r\n\t\t'key' : 'c1158f160081d6540a8409e6925dab94',\r\n\t\t'format' : 'iframe',\r\n\t\t'height' : 250,\r\n\t\t'width' : 300,\r\n\t\t'params' : {}\r\n\t};\r\n<\/script>\r\n<script type=\"text\/javascript\" src=\"\/\/www.highperformanceformat.com\/c1158f160081d6540a8409e6925dab94\/invoke.js\"><\/script><\/div> <div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"0-1-what-does-vba-stand-for\" class=\"wp-block-heading\"> 1.VBA\u662f\u4ec0\u4e48\u610f\u601d\uff1f<\/h2><p> VBA \u4ee3\u8868 Visual Basic for Application\uff0c\u8fd9\u662f\u4e00\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ef\u5e2e\u52a9\u60a8\u81ea\u52a8\u6267\u884c Excel \u4e2d\u7684\u51e0\u4e4e\u6240\u6709\u6d3b\u52a8\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"1-2-what-kind-of-language-vba-is\" class=\"wp-block-heading\"> 2.VBA\u662f\u4ec0\u4e48\u7c7b\u578b\u7684\u8bed\u8a00\uff1f<\/h2><p> VBA \u662f\u4e00\u79cd\u9762\u5411\u5bf9\u8c61\u7684\u8bed\u8a00\uff0c\u60a8\u9996\u5148\u5b9a\u4e49\u4e00\u4e2a\u5bf9\u8c61\uff0c\u7136\u540e\u5b9a\u4e49\u8981\u6267\u884c\u7684\u6d3b\u52a8\u3002\u4f8b\u5982\uff0c\u5982\u679c\u8981\u9009\u62e9\u4e00\u4e2a\u8303\u56f4\uff0c\u5219\u5fc5\u987b\u9996\u5148\u5b9a\u4e49\u8be5\u8303\u56f4\uff0c\u7136\u540e\u5b9a\u4e49\u9009\u62e9\u5b83\u7684\u65b9\u6cd5\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60609\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5b9a\u4e49\u8303\u56f4\" width=\"666\" height=\"239\"><\/figure><\/div><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"2-3-what-is-an-object-in-vba\" class=\"wp-block-heading\"> 3.VBA\u4e2d\u4ec0\u4e48\u662f\u5bf9\u8c61\uff1f<\/h2><p> VBA \u662f\u4e00\u79cd\u9762\u5411\u5bf9\u8c61\u7684\u8bed\u8a00\u3002\u4f8b\u5982\uff0c\u5f53\u60a8\u5f15\u7528\u5de5\u4f5c\u8868\u65f6\uff0c\u60a8\u5f15\u7528\u7684\u662f\u4e00\u4e2a\u5bf9\u8c61\uff0c\u53ea\u6709\u8fd9\u6837\u60a8\u624d\u80fd\u4f7f\u7528\u5c5e\u6027\u548c\u65b9\u6cd5\u3002\u60a8\u53ef\u4ee5<a href=\"https:\/\/exceladvisor.org\/cn\/\u7269\u4f53\/\">\u5728\u6b64\u5904<\/a>\u4e86\u89e3\u6709\u5173\u8fd9\u4e9b\u9879\u76ee\u7684\u66f4\u591a\u4fe1\u606f\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"3-4-what-is-the-object-hierarchy-in-excel\" class=\"wp-block-heading\"> 4. Excel \u4e2d\u7684\u5bf9\u8c61\u5c42\u6b21\u7ed3\u6784\u662f\u4ec0\u4e48\uff1f<\/h2><p>\u5728 Excel \u4e2d\uff0c\u6240\u6709\u5bf9\u8c61\u90fd\u6309\u5c42\u6b21\u7ed3\u6784\u6784\u5efa\u3002\u8fd9\u662f\u5b8c\u6574\u7684\u56fe\u7247\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u7406\u89e3\u5b83\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60610\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/2-hierarchie-dobjets-dans-excel.png\" sizes=\"auto, \" srcset=\"\" alt=\"Excel \u4e2d\u7684\u5bf9\u8c61\u5c42\u6b21\u7ed3\u6784\" width=\"463\" height=\"473\"><\/figure><\/div><p>\u5176\u4e2d\u6bcf\u4e2a\u5bf9\u8c61\u8fd8\u9644\u5e26\u53ef\u7528\u4e8e\u6267\u884c\u6d3b\u52a8\u7684\u5c5e\u6027\u548c\u65b9\u6cd5\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"4-5-how-to-activate-the-developer-tab\" class=\"wp-block-heading\"> 5. \u5982\u4f55\u6fc0\u6d3b\u5f00\u53d1\u8005\u9009\u9879\u5361\uff1f<\/h2><p>\u5728\u8bbf\u95ee Visual Basic \u7f16\u8f91\u5668\u548c\u5176\u4ed6\u9009\u9879\u4e4b\u524d\uff0c\u5fc5\u987b\u4f7f\u7528\u4ee5\u4e0b\u6b65\u9aa4<a href=\"https:\/\/exceladvisor.org\/cn\/\u6dfb\u52a0\u5f00\u53d1\u8005\u9009\u9879\u5361\/\">\u542f\u7528\u201c\u5f00\u53d1\u4eba\u5458\u201d\u9009\u9879\u5361<\/a>\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60611\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/3-activer-longlet-developpeur.jpg\" sizes=\"auto, \" srcset=\"\" alt=\"\u542f\u7528\u5f00\u53d1\u8005\u9009\u9879\u5361\" width=\"675\" height=\"106\"><\/figure><\/div><ol type=\"1\"><li>\u6587\u4ef6\u9009\u9879\u5361\u2192\u9009\u9879\u2192\u81ea\u5b9a\u4e49\u529f\u80fd\u533a\u3002<\/li><li>\u68c0\u67e5\u5f00\u53d1\u4eba\u5458\u6846\u3002<\/li><li>\u5355\u51fb\u201c\u786e\u5b9a\u201d\u3002 <\/li><\/ol><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"5-6-how-to-use-the-visual-basic-editor\" class=\"wp-block-heading\"> 6. \u5982\u4f55\u4f7f\u7528Visual Basic\u7f16\u8f91\u5668\uff1f<\/h2><p>\u542f\u7528\u5f00\u53d1\u4eba\u5458\u9009\u9879\u5361\u540e\uff0c\u60a8\u53ef\u4ee5\u4ece\u90a3\u91cc\u8bbf\u95ee\u53ef\u89c6\u5316\u57fa\u7840\u7f16\u8f91\u5668\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60612\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/4-acceder-a-lediteur-de-base-visuel.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u8bbf\u95ee\u57fa\u672c\u89c6\u89c9\u7f16\u8f91\u5668\" width=\"601\" height=\"141\"><\/figure><\/div><p>\u5355\u51fb\u201cVisual Basic\u201d\u6309\u94ae\u65f6\uff0c\u60a8\u5c06\u770b\u5230\u4e00\u4e2a\u5355\u72ec\u6253\u5f00\u7684 Visual Basic \u7a97\u53e3\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60613\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/5-fenetre-de-base-visuelle.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u89c6\u89c9\u57fa\u7840\u7a97\u53e3\" width=\"753\" height=\"425\"><\/figure><\/div><p><a href=\"https:\/\/exceladvisor.org\/cn\/\u57fa\u672c\u53ef\u89c6\u5316\u7f16\u8f91\u5668\/\">\u8fd9\u662f\u4e00\u4e2a\u5b8c\u6574\u7684\u6307\u5357<\/a>\uff0c\u53ef\u4ee5\u5e2e\u52a9\u60a8\u4e86\u89e3\u5982\u4f55\u4f7f\u7528 Visual Basic \u7f16\u8f91\u5668\u7f16\u5199 VBA \u4ee3\u7801\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"6-7-where-you-can-write-a-macro-vba-code\" class=\"wp-block-heading\"> 7. \u5728\u54ea\u91cc\u53ef\u4ee5\u7f16\u5199\u5b8f\uff08VBA\u4ee3\u7801\uff09\uff1f<\/h2><p>\u5f53\u60a8\u6253\u5f00 Visual Basic \u7f16\u8f91\u5668\u65f6\uff0c\u60a8\u5c06\u770b\u5230\u4e00\u4e2a\u4ee3\u7801\u7a97\u53e3\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u7f16\u5199\u4ee3\u7801\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60615\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/fenetre-a-6-codes.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4ee3\u7801\u7a97\u53e3\" width=\"500\" height=\"387\"><\/figure><\/div><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"7-8-what-are-the-ways-to-write-a-macro-vba-code-in-excel\" class=\"wp-block-heading\"> 8. Excel\u4e2d\u6709\u54ea\u4e9b\u7f16\u5199\u5b8f\uff08VBA\u4ee3\u7801\uff09\u7684\u65b9\u6cd5\uff1f<\/h2><p>\u7f16\u5199\u5b8f\u7684\u6700\u4f73\u65b9\u6cd5\u4e4b\u4e00\u662f\u76f4\u63a5\u5728\u4ee3\u7801\u7a97\u53e3\u4e2d\u7f16\u5199\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"8-9-how-to-add-a-comment-in-a-vba-code\" class=\"wp-block-heading\"> 9. \u5982\u4f55\u5728VBA\u4ee3\u7801\u4e2d\u6dfb\u52a0\u6ce8\u91ca\uff1f<\/h2><p>\u8981\u6dfb\u52a0\u6ce8\u91ca\uff0c\u60a8\u9700\u8981\u4ee5\u6487\u53f7 (&#8216;) \u5f00\u59cb\u6ce8\u91ca\u884c\uff0c\u7136\u540e\u5728\u5b8c\u6210\u540e\u7f16\u5199\u6ce8\u91ca\uff0c\u6309 Enter \u952e\u79fb\u81f3\u4e0b\u4e00\u884c\uff08<a href=\"https:\/\/exceladvisor.org\/cn\/\u9519\u8bef\u5904\u7406\/\">\u4e86\u89e3\u6709\u5173\u6dfb\u52a0\u6ce8\u91ca\u4ee5\u79bb\u5f00\u6b64\u4f4d\u7f6e\u7684\u66f4\u591a\u4fe1\u606f<\/a>\uff09\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60616\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/7-ajouter-un-commentaire.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u6dfb\u52a0\u8bc4\u8bba\" width=\"324\" height=\"157\"><\/figure><\/div><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"9-10-how-to-run-a-macro\" class=\"wp-block-heading\"> 10. \u5982\u4f55\u8fd0\u884c\u5b8f\uff1f<\/h2><p>\u60a8\u53ef\u4ee5\u8fd0\u884c\u5b8f\u5217\u8868\u4e2d\u7684\u5b8f\u3002\u5728\u201c\u5f00\u53d1\u4eba\u5458\u201d\u9009\u9879\u5361\u4e2d\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201c\u5b8f\u201d\u7684\u6309\u94ae\uff0c\u5f53\u60a8\u5355\u51fb\u5b83\u65f6\uff0c\u5b83\u4f1a\u663e\u793a\u4e00\u4e2a\u5bf9\u8bdd\u6846\uff0c\u5176\u4e2d\u5305\u542b\u6240\u6709\u6253\u5f00\u7684\u5de5\u4f5c\u7c3f\u4e2d\u7684\u5b8f\u5217\u8868\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60617\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/8-executer-une-macro.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u8fd0\u884c\u5b8f\" width=\"584\" height=\"389\"><\/figure><\/div><p>\u9664\u6b64\u4e4b\u5916\uff0c\u8fd8\u6709\u591a\u79cd\u8fd0\u884c\u5b8f\u7684\u65b9\u6cd5\uff0c\u8bf7\u52a1\u5fc5<a href=\"https:\/\/exceladvisor.org\/cn\/\u6267\u884c\u5b8f2\/\">\u67e5\u770b\u672c\u6559\u7a0b<\/a>\u4ee5\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\u3002 <\/p><\/div><\/div><div class=\"wp-block-group more-box is-layout-constrained\"><div class=\"wp-block-group__inner-container\"><h2 id=\"10-11-how-to-record-a-macro-in-excel\" class=\"wp-block-heading\"> 11. \u5982\u4f55\u5728Excel\u4e2d\u5f55\u5236\u5b8f\uff1f<\/h2><p>\u5728Excel\u4e2d\uff0c\u6709\u4e00\u4e2a\u5b8f\u8bb0\u5f55\u5668\u53ef\u4ee5\u5e2e\u52a9\u60a8\u8bb0\u5f55\u60a8\u6267\u884c\u7684\u51e0\u4e4e\u6bcf\u4e00\u4e2a\u6d3b\u52a8\u5e76\u5728\u540e\u7aef\u751f\u6210\u6240\u6709\u4ee3\u7801\u3002\u5982\u679c\u60a8\u770b\u5230\uff0c\u5728\u5f00\u53d1\u4eba\u5458\u9009\u9879\u5361\u4e0a\u6709\u4e00\u4e2a\u540d\u4e3a\u201c\u5f55\u5236\u5b8f\u201d\u7684\u6309\u94ae\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60618\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/9-enregistrer-une-macro.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5b8f\u8bb0\u5f55\" width=\"717\" height=\"212\"><\/figure><\/div><p>\u5355\u51fb\u5b83\u65f6\uff0c\u5c06\u51fa\u73b0\u4e00\u4e2a\u5bf9\u8bdd\u6846\uff0c\u8f93\u5165\u8981\u5f55\u5236\u7684\u5b8f\u7684\u8be6\u7ec6\u4fe1\u606f\uff0c\u5b8c\u6210\u540e\uff0c\u5355\u51fb\u201c\u786e\u5b9a\u201d\u5f00\u59cb\u5f55\u5236\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60619\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/10-cliquez-sur-ok-pour-commencer-lenregistrement.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5355\u51fb\u786e\u5b9a\u5f00\u59cb\u5f55\u5236\" width=\"476\" height=\"383\"><\/figure><\/div><p>\u8fd9\u662f\u5b66\u4e60<a href=\"https:\/\/exceladvisor.org\/cn\/\u5f55\u5236\u5b8f\/\">\u5982\u4f55\u5f55\u5236\u5b8f\u7684<\/a>\u5b8c\u6574\u6307\u5357\u3002<\/p><\/div><\/div><h2 id=\"11-12-how-to-save-a-macro-in-excel\" class=\"wp-block-heading\"> 12. \u5982\u4f55\u5728Excel\u4e2d\u5f55\u5236\u5b8f\uff1f<\/h2><p>\u5f53\u60a8\u7f16\u5199\u5b8f\u65f6\uff0c\u5b83\u4f1a\u81ea\u52a8\u4fdd\u5b58\u5728\u60a8\u7f16\u5199\u5b8f\u7684\u5de5\u4f5c\u7c3f\u4e2d\uff0c\u65e0\u9700\u5355\u72ec\u4fdd\u5b58\u3002\u4f46\u60a8\u9700\u8981\u4ee5\u5b8f\u683c\u5f0f (.xlsm) \u4fdd\u5b58\u5de5\u4f5c\u7c3f\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60620\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/11-enregistrer-une-macro-dans-excel.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5728 Excel \u4e2d\u4fdd\u5b58\u5b8f\" width=\"495\" height=\"166\"><\/figure><\/div><p>\u5f53\u60a8\u5c1d\u8bd5\u4ee5\u5305\u542b\u5b8f\u7684\u5176\u4ed6\u683c\u5f0f\u4fdd\u5b58\u5de5\u4f5c\u7c3f\u65f6\uff0cExcel \u4f1a\u53d1\u51fa\u8b66\u62a5\u3002<\/p><h2 id=\"12-13-what-is-a-module\" class=\"wp-block-heading\"> 13.\u4ec0\u4e48\u662f\u6a21\u5757\uff1f<\/h2><p> <a href=\"https:\/\/exceladvisor.org\/cn\/\u6a21\u5757\/\">VBA \u6a21\u5757<\/a>\u662f\u4e00\u4e2a\u201c.bcf\u201d\u6269\u5c55\u6587\u4ef6\uff0c\u5b83\u6709\u4e00\u4e2a\u4ee3\u7801\u7a97\u53e3\uff0c\u60a8\u53ef\u4ee5\u5728\u5176\u4e2d\u7f16\u5199\u5b8f\u3002\u60a8\u53ef\u4ee5\u5728\u5de5\u4f5c\u7c3f\u4e2d\u63d2\u5165\u3001\u5220\u9664\u751a\u81f3\u5bfc\u5165\u548c\u5bfc\u51fa\u6a21\u5757\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60621\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/module-12vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u6a21\u5757\" width=\"488\" height=\"372\"><\/figure><\/div><h2 id=\"13-14-what-is-a-procedure-in-vba\" class=\"wp-block-heading\"> 14.VBA\u4e2d\u7684\u8fc7\u7a0b\u662f\u4ec0\u4e48\uff1f<\/h2><p>\u5f53\u60a8\u5728 VBA \u4e2d\u7f16\u5199\u5b8f\u65f6\uff0c\u5b83\u79f0\u4e3a\u8fc7\u7a0b\u3002\u8fc7\u7a0b\u53ef\u4ee5\u7531\u5355\u884c\u4ee3\u7801\u6216\u591a\u884c\u4ee3\u7801\u7ec4\u6210\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60622\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/13-procedure-en-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u4e2d\u7684\u8fc7\u7a0b\" width=\"667\" height=\"258\"><\/figure><\/div><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4e00\u4e2a\u540d\u4e3a\u201cvba_border\u201d\u7684\u8fc7\u7a0b\uff0c\u5b83\u6709\u4e00\u884c\uff0c\u4f46\u5df2\u5c06\u8be5<a href=\"https:\/\/exceladvisor.org\/cn\/\u8d8a\u7ebf\/\">\u884c\u62c6\u5206\u4e3a\u591a\u884c<\/a>\u3002<\/p><h2 id=\"14-15-what-are-the-types-of-procedures\" class=\"wp-block-heading\"> 15. \u7a0b\u5e8f\u6709\u54ea\u4e9b\u7c7b\u578b\uff1f<\/h2><p>\u5728 VBA \u4e2d\u53ef\u4ee5\u4f7f\u7528\u4e24\u79cd\u7c7b\u578b\u7684\u8fc7\u7a0b\uff0c\u7b2c\u4e00\u79cd\u662f\u201c\u5b50\u201d\u8fc7\u7a0b\uff0c\u7b2c\u4e8c\u79cd\u662f\u201c\u51fd\u6570\u201d\u8fc7\u7a0b\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60623\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/14-types-de-procedures-dans-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u4e2d\u7684\u8fc7\u7a0b\u7c7b\u578b\" width=\"471\" height=\"285\"><\/figure><\/div><p>\u5982\u679c\u8981\u7f16\u5199\u201cSub\u201d\u8fc7\u7a0b\uff0c\u5219\u9700\u8981\u4ee5\u201cSub\u201d\u5173\u952e\u5b57\u5f00\u59cb\u4ee3\u7801\uff0c\u5e76\u4e14\u5bf9\u4e8e\u51fd\u6570\u8fc7\u7a0b<\/p><h2 id=\"15-16-what-is-a-variable\" class=\"wp-block-heading\">16.\u4ec0\u4e48\u662f\u53d8\u91cf\uff1f<\/h2><p>\u987e\u540d\u601d\u4e49\uff0c\u53d8\u91cf\u662f\u4e0d\u56fa\u5b9a\u7684\u4e1c\u897f\u3002\u5728 VBA \u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u53d8\u91cf\u6765\u5b58\u50a8\u503c\uff0c\u5e76\u4e14\u53ef\u4ee5\u5728\u6267\u884c\u4ee3\u7801\u65f6\u968f\u65f6\u66f4\u6539\u8be5\u503c\u3002<\/p><h2 id=\"16-17-how-to-declare-a-variable-in-vba\" class=\"wp-block-heading\"> 17.\u5982\u4f55\u5728VBA\u4e2d\u58f0\u660e\u53d8\u91cf\uff1f<\/h2><p>\u8981\u4f7f\u7528\u53d8\u91cf\uff0c\u5fc5\u987b\u9996\u5148\u4f7f\u7528<a href=\"https:\/\/exceladvisor.org\/cn\/\u865a\u5f31\u7684\/\">\u201cDim\u201d\u5173\u952e\u5b57<\/a>\u58f0\u660e\u5b83\u3002\u5728\u4e0b\u9762\u7684\u4ee3\u7801\u793a\u4f8b\u4e2d\uff0c\u60a8\u53ef\u4ee5\u770b\u5230\u6211\u4eec\u4f7f\u7528\u4e86\u201cDim\u201d\u3001\u53d8\u91cf\u540d\u79f0\uff0c\u7136\u540e\u662f\u6570\u636e\u7c7b\u578b\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60624\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/15-utiliser-une-variable.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4f7f\u7528\u53d8\u91cf\" width=\"330\" height=\"251\"><\/figure><\/div><p>\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 dim \u8bed\u53e5\u58f0\u660e\u53d8\u91cf\u201cstartDate\u201d\u5e76\u6307\u5b9a\u65e5\u671f\u4f5c\u4e3a\u6570\u636e\u7c7b\u578b\u3002\u4e4b\u540e\u6211\u4eec\u4e3a\u53d8\u91cf\u6307\u5b9a\u4e86\u4e00\u4e2a\u65e5\u671f\u503c\u3002\u7136\u540e\u60a8\u5c06\u4ece<a href=\"https:\/\/exceladvisor.org\/cn\/\u53d8\u91cf\/\">\u8fd9\u91cc<\/a>\u4e86\u89e3\u6709\u5173\u53d8\u91cf\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/p><h2 id=\"17-18-what-are-the-vba-data-types\" class=\"wp-block-heading\"> 18.VBA \u6570\u636e\u7c7b\u578b\u6709\u54ea\u4e9b\uff1f<\/h2><p>\u58f0\u660e\u53d8\u91cf\uff08\u751a\u81f3\u5e38\u91cf\uff09\u65f6\uff0c\u5fc5\u987b\u6307\u5b9a\u6570\u636e\u7c7b\u578b\u3002\u58f0\u660e\u6570\u636e\u7c7b\u578b\u6709\u52a9\u4e8e VBA \u4e86\u89e3\u8981\u5728\u53d8\u91cf\u4e2d\u5b58\u50a8\u7684\u503c\u7c7b\u578b\u3002\u5047\u8bbe\u5982\u679c\u60a8\u60f3\u50cf\u524d\u9762\u7684\u793a\u4f8b\u4e2d\u90a3\u6837\u5728\u53d8\u91cf\u4e2d\u5b58\u50a8\u65e5\u671f\uff0c\u5219\u9700\u8981\u5c06\u6570\u636e\u7c7b\u578b\u6307\u5b9a\u4e3a\u65e5\u671f\u3002<\/p><h2 id=\"18-19-what-is-option-explicit\" class=\"wp-block-heading\"> 19. \u4ec0\u4e48\u662f\u663e\u5f0f\u9009\u9879\uff1f<\/h2><p> <a href=\"https:\/\/exceladvisor.org\/cn\/\u663e\u5f0f\u9009\u9879-2\/\">Option Explicit<\/a>\u662f\u60a8\u53ef\u4ee5\u5728\u6a21\u5757\u5f00\u5934\u4f7f\u7528\u7684\u8bed\u53e5\uff0c\u4e00\u65e6\u60a8\u4f7f\u7528\u6b64\u8bed\u53e5\uff0c\u5982\u679c\u60a8\u8df3\u8fc7\u58f0\u660e\u53d8\u91cf\uff0c\u6211\u4eec\u4f1a\u5411\u60a8\u53d1\u51fa\u8b66\u544a\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60625\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/16-option-explicite.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u663e\u5f0f\u9009\u9879\" width=\"439\" height=\"267\"><\/figure><\/div><p>\u4e0a\u9762\u7684\u5c4f\u5e55\u622a\u56fe\u662f\u6700\u597d\u7684\u4f8b\u5b50\uff0c\u6211\u4eec\u5728\u6ca1\u6709\u58f0\u660e\u7684\u60c5\u51b5\u4e0b\u4f7f\u7528\u4e86\u53d8\u91cf\u201ca\u201d\uff0c\u5e76\u4e14\u5728\u8fd0\u884c\u4ee3\u7801\u65f6\uff0c\u51fa\u73b0\u4e86\u4e00\u6761\u7f16\u8bd1\u9519\u8bef\u6d88\u606f\uff0c\u663e\u793a\u201c\u672a\u5b9a\u4e49\u7684\u53d8\u91cf\u201d\u3002\u6b63\u5982\u60a8\u5728\u9876\u90e8\u770b\u5230\u7684\uff0c\u6211\u4eec\u4f7f\u7528\u4e86\u663e\u5f0f\u58f0\u660e\u9009\u9879\u3002<\/p><h2 id=\"19-20-what-is-a-constant\" class=\"wp-block-heading\"> 20.\u4ec0\u4e48\u662f\u5e38\u6570\uff1f<\/h2><p>\u4e0e\u53d8\u91cf\u4e00\u6837\uff0c\u5e38\u91cf\u4e5f\u5b58\u50a8\u503c\u3002\u4f46\u662f\uff0c\u5bf9\u4e8e\u5e38\u91cf\uff0c\u60a8\u53ef\u4ee5\u4fee\u6539\u5b58\u50a8\u5728\u5176\u4e2d\u7684\u503c\u3002\u8981\u58f0\u660e\u5e38\u91cf\uff0c\u60a8\u9700\u8981\u50cf\u5728\u53d8\u91cf\u4e2d\u4f7f\u7528\u5b83\u4e00\u6837\u4f7f\u7528\u5b83\uff0c\u4f46\u60a8\u9700\u8981\u4f7f\u7528\u5de5\u4f5c\u5e38\u91cf\u6765\u58f0\u660e\uff0c\u800c\u4e0d\u662f\u201cDim\u201d\uff08\u8bf7\u53c2\u9605\u4ee5\u4e0b\u793a\u4f8b\uff0c\u8fd9\u91cc\u662f<a href=\"https:\/\/exceladvisor.org\/cn\/\u5e38\u91cf\/\">\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\u7684\u94fe\u63a5<\/a>\uff09\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60626\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/17-constante-en-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u4e2d\u7684\u5e38\u91cf\" width=\"421\" height=\"232\"><\/figure><\/div><h2 id=\"20-21-how-to-refer-to-a-workbook-in-a-vba-code\" class=\"wp-block-heading\"> 21.\u5982\u4f55\u5728VBA\u4ee3\u7801\u4e2d\u5f15\u7528\u5de5\u4f5c\u7c3f\uff1f<\/h2><p>\u8981\u5f15\u7528\u5de5\u4f5c\u7c3f\uff0c\u5fc5\u987b\u4f7f\u7528<a href=\"https:\/\/exceladvisor.org\/cn\/\u6d3b\u9875\u5939\/\">\u5de5\u4f5c\u7c3f\u5bf9\u8c61<\/a>\uff0c\u7136\u540e\u6307\u5b9a\u8981\u5f15\u7528\u7684\u5de5\u4f5c\u7c3f\u7684\u540d\u79f0\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60627\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/18-se-referer-a-un-classeur.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u53c2\u8003\u5de5\u4f5c\u7c3f\" width=\"314\" height=\"142\"><\/figure><\/div><p>\u5728\u4e0a\u9762\u7684\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u9700\u8981\u4f7f\u7528workbook\u5bf9\u8c61\uff0c\u7136\u540e\u6211\u4eec\u4f7f\u7528\u6587\u4ef6\u6269\u5c55\u540d\u5f15\u7528book1\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u793a\u4f8b\uff0c\u60a8\u53ef\u4ee5\u4e86\u89e3\u5982\u4f55\u5728 Excel VBA \u4e2d\u4f7f\u7528\u5de5\u4f5c\u7c3f\u3002<\/p><p><em><a href=\"https:\/\/exceladvisor.org\/cn\/\u4fdd\u5b58\u5de5\u4f5c\u7c3f\/\">\u4fdd\u5b58\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5220\u9664\u6587\u4ef6\/\">\u5220\u9664\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u8fd9\u4e2a\u7b14\u8bb0\u672c\/\">\u8bf7\u53c2\u9605\u672c\u5de5\u4f5c\u624b\u518c<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u91cd\u547d\u540d\u5de5\u4f5c\u7c3f\/\">\u91cd\u547d\u540d\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u6fc0\u6d3b\u5de5\u4f5c\u7c3f\/\">\u6fc0\u6d3b\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5408\u5e76\u5de5\u4f5c\u7c3f\/\">\u5408\u5e76\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u4fdd\u62a4\u5de5\u4f5c\u7c3f\/\">\u4fdd\u62a4\u5de5\u4f5c\u7c3f\uff08\u53d6\u6d88\u4fdd\u62a4\uff09<\/a> |<a href=\"https:\/\/exceladvisor.org\/cn\/\u68c0\u67e5\u6253\u5f00\u7684\u5de5\u4f5c\u7c3f\/\">\u68c0\u67e5\u5de5\u4f5c\u7c3f\u662f\u5426\u6253\u5f00<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u6253\u5f00\u6587\u4ef6\u67dc\/\">\u6253\u5f00\u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u68c0\u67e5\u5de5\u4f5c\u7c3f\u662f\u5426\u5b58\u5728\/\">\u68c0\u67e5\u6587\u4ef6\u5939\u4e2d\u662f\u5426\u5b58\u5728 Excel \u5de5\u4f5c\u7c3f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u521b\u5efa\u5de5\u4f5c\u7c3f\/\">\u521b\u5efa\u65b0\u5de5\u4f5c\u7c3f\uff08Excel \u6587\u4ef6\uff09<\/a> |<a href=\"https:\/\/exceladvisor.org\/cn\/\u5173\u95ed\u5de5\u4f5c\u7c3f\/\">\u5173\u95ed\u5de5\u4f5c\u7c3f<\/a><\/em><\/p><h2 id=\"21-22-how-to-refer-to-a-worksheet-in-a-vba-code\" class=\"wp-block-heading\">22. \u5982\u4f55\u5728VBA\u4ee3\u7801\u4e2d\u5f15\u7528\u5de5\u4f5c\u8868\uff1f<\/h2><p>\u8981\u5f15\u7528\u5de5\u4f5c\u8868\uff0c\u60a8\u9700\u8981\u4f7f\u7528\u5de5\u4f5c\u8868\u5bf9\u8c61\uff0c\u7136\u540e\u9700\u8981\u6307\u5b9a\u8981\u5f15\u7528\u7684\u5de5\u4f5c\u8868\u7684\u540d\u79f0\u3002\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528\u5de5\u4f5c\u8868\u5bf9\u8c61\uff0c\u7136\u540e\u6307\u5b9a\u201cSheet1\u201d\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60628\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/19-se-referer-a-une-feuille-de-travail.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u53c2\u8003\u7535\u5b50\u8868\u683c\" width=\"490\" height=\"287\"><\/figure><\/div><p>\u6b63\u5982\u60a8\u6240\u770b\u5230\u7684\uff0c\u6211\u4eec\u4f7f\u7528\u201c\u5de5\u4f5c\u8868\u201d\u548c\u201c\u5de5\u4f5c\u8868\u201d\u6765\u6307\u4ee3\u540c\u4e00\u4e2a\u5de5\u4f5c\u8868\uff0c\u60a8\u9700\u8981\u4e86\u89e3\u5de5\u4f5c\u8868\u548c\u7535\u5b50\u8868\u683c\u4e4b\u95f4\u7684\u533a\u522b\uff0c\u8fd9\u91cc\u662f<a href=\"https:\/\/exceladvisor.org\/cn\/\u5de5\u4f5c\u8868-1\/\">\u5b8c\u6574\u7684\u6307\u5357<\/a>\u3002<\/p><p><a href=\"https:\/\/exceladvisor.org\/cn\/\u6570\u53f6\u5b50\/\">\u8ba1\u6570\u8868<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u6fc0\u6d3b\u8868\/\">\u6fc0\u6d3b\u5de5\u4f5c\u8868<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5faa\u73af\u53f6\/\">\u6d4f\u89c8\u6240\u6709\u7684\u8868\u683c<\/a><\/p><ul><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u63a7\u5236\u8868\u5b58\u5728\/\">\u68c0\u67e5\u5de5\u4f5c\u8868\u662f\u5426\u5b58\u5728<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u900f\u660e\u7eb8\/\">\u64e6\u9664\u6574\u5f20\u7eb8<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u4fdd\u62a4\u53f6\u5b50\/\">\u4fdd\u62a4\u548c\u53d6\u6d88\u4fdd\u62a4\u5de5\u4f5c\u8868<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u5220\u9664\u5de5\u4f5c\u8868-1\/\">\u5220\u9664\u5de5\u4f5c\u8868<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u9690\u85cf\u8868\/\">\u9690\u85cf\\\u663e\u793a\u5de5\u4f5c\u8868<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u91cd\u547d\u540d\u5de5\u4f5c\u8868\/\">\u5982\u4f55\u4f7f\u7528 VBA \u91cd\u547d\u540d Excel \u5de5\u4f5c\u8868<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u7ef4\u5df4\/\">\u5982\u4f55\u4f7f\u7528 VBA \u5728 Excel \u4e2d\u590d\u5236\u5de5\u4f5c\u8868<\/a><\/li><li><a href=\"https:\/\/exceladvisor.org\/cn\/\u6fc0\u6d3b\u8868\/\">\u5982\u4f55\u4f7f\u7528 VBA \u6fc0\u6d3b\u5de5\u4f5c\u8868<\/a><\/li><\/ul><h2 id=\"22-23-how-to-select-a-range-of-cells-using-a-macro\" class=\"wp-block-heading\"> 23. \u5982\u4f55\u4f7f\u7528\u5b8f\u9009\u62e9\u5355\u5143\u683c\u8303\u56f4\uff1f<\/h2><p>\u8981\u9009\u62e9\u8303\u56f4\u6216\u5355\u5143\u683c\uff0c\u5fc5\u987b\u9996\u5148\u4f7f\u7528\u8303\u56f4\u5bf9\u8c61\u6307\u5b9a\u8303\u56f4\uff0c\u7136\u540e\u6307\u5b9a\u9009\u62e9\u65b9\u6cd5\uff0c\u5f53\u60a8\u8fd0\u884c\u6b64\u4ee3\u7801\u65f6\uff0cExcel \u5c06\u9009\u62e9\u60a8\u6307\u5b9a\u7684\u8303\u56f4\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60629\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/20-selectionner-une-plage-de-cellules-a-laide-dune-macro.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4f7f\u7528\u5b8f\u9009\u62e9\u5355\u5143\u683c\u8303\u56f4\" width=\"372\" height=\"269\"><\/figure><\/div><p>\u6b63\u5982\u60a8\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\u770b\u5230\u7684\uff0c\u6211\u4eec\u6307\u5b9a\u4e86\u8303\u56f4 A1 \u5e76\u4f7f\u7528 select \u65b9\u6cd5\u3002\u4ee5\u4e0b\u662f\u60a8\u53ef\u4ee5\u4f7f\u7528 VBA \u5bf9\u5355\u5143\u683c\u548c\u8303\u56f4\u6267\u884c\u7684\u4e00\u4e9b\u91cd\u8981\u4efb\u52a1\u3002<\/p><h2 id=\"23-24-how-to-get-value-from-a-cell-using-a-macro\" class=\"wp-block-heading\"> 24. \u5982\u4f55\u4f7f\u7528\u5b8f\u83b7\u53d6\u5355\u5143\u683c\u7684\u503c\uff1f<\/h2><p>\u8981\u4ece\u5355\u5143\u683c\u4e2d\u83b7\u53d6\u503c\uff0c\u60a8\u9700\u8981\u4f7f\u7528 value \u65b9\u6cd5\uff0c\u7136\u540e\u5c06\u8be5\u503c\u5206\u914d\u7ed9\u4e0d\u540c\u7684\u5355\u5143\u683c\u6765\u83b7\u53d6\u5b83\u3002\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528 range \u5bf9\u8c61\u6765\u6307\u5b9a A1\uff0c\u7136\u540e\u6211\u4eec\u4f7f\u7528 value \u65b9\u6cd5\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60630\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/21-obtenir-la-valeur-dune-cellule-a-laide-dune-macro.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4f7f\u7528\u5b8f\u83b7\u53d6\u5355\u5143\u683c\u7684\u503c\" width=\"417\" height=\"298\"><\/figure><\/div><p>\u4e4b\u540e\u6211\u4eec\u5c06\u5176\u5206\u914d\u7ed9\u5355\u5143\u683c A2\uff0c\u5f53\u60a8\u4f7f\u7528\u6b64\u4ee3\u7801\u65f6\uff0c\u60a8\u5c06\u5728\u5355\u5143\u683c A2 \u4e2d\u83b7\u5f97\u5355\u5143\u683c A1 \u7684\u503c\u3002<\/p><h2 id=\"24-25-how-to-enter-a-value-in-a-cell-using-vba\" class=\"wp-block-heading\"> 25.\u5982\u4f55\u7528VBA\u5728\u5355\u5143\u683c\u4e2d\u8f93\u5165\u503c\uff1f<\/h2><p>\u8981<a href=\"https:\/\/exceladvisor.org\/cn\/\u5355\u5143\u683c\u503c\/\">\u5728\u5355\u5143\u683c\u4e2d\u8f93\u5165\u503c\uff0c<\/a>\u5fc5\u987b\u9996\u5148\u4f7f\u7528\u8303\u56f4\u5bf9\u8c61\uff0c\u7136\u540e\u6307\u5b9a\u8981\u4f7f\u7528\u7684\u503c\u3002\u5728\u4ee5\u4e0b\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u6709\u4ee3\u7801\u5728\u5355\u5143\u683c A1 \u4e2d\u8f93\u5165\u503c\u3002\u9996\u5148\uff0c\u6211\u4eec\u4f7f\u7528\u8303\u56f4\u5bf9\u8c61\uff0c\u7136\u540e\u4f7f\u7528\u7b49\u53f7\u6307\u5b9a\u8981\u8f93\u5165\u7684\u201c\u662f\u201d\u503c\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60631\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/22-entrer-une-valeur-dans-une-cellule.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5728\u5355\u5143\u683c\u4e2d\u8f93\u5165\u4e00\u4e2a\u503c\" width=\"482\" height=\"372\"><\/figure><\/div><p>\u6b63\u5982\u60a8\u6240\u770b\u5230\u7684\uff0c\u6211\u4eec\u5c06\u8be5\u503c\u62ec\u5728\u53cc\u5f15\u53f7\u4e2d\uff0c\u56e0\u4e3a\u5b83\u662f\u6587\u672c\u503c\u3002<\/p><h2 id=\"25-26-how-to-show-a-message-to-a-user\" class=\"wp-block-heading\"> 26. \u5982\u4f55\u5411\u7528\u6237\u663e\u793a\u6d88\u606f\uff1f<\/h2><p>\u5728 VBA \u4e2d\uff0c\u201cMsgBox\u201d\u662f\u4e00\u4e2a\u51fd\u6570\uff0c\u53ef\u7528\u4e8e\u5411\u7528\u6237\u663e\u793a\u6d88\u606f\u6846\u5e76\u901a\u8fc7\u6d88\u606f\u6846\u4e0a\u7684\u6309\u94ae\u83b7\u53d6\u54cd\u5e94\u3002\u8bf7\u53c2\u9605\u4ee5\u4e0b\u793a\u4f8b\u3002<\/p><p> =MSGBOX\uff08\u63d0\u793a\uff0c[\u6309\u94ae]\uff0c[\u6807\u9898]\uff0c[\u5e2e\u52a9\u6587\u4ef6\uff0c\u4e0a\u4e0b\u6587]\uff09 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60632\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/23-fonction-msgbox-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"vba \u6d88\u606f\u6846\u51fd\u6570\" width=\"310\" height=\"245\"><\/figure><\/div><p>\u60a8\u53ef\u4ee5\u4ece<a href=\"https:\/\/exceladvisor.org\/cn\/vba\u6d88\u606f\u6846\/\">\u672c\u6307\u5357<\/a>\u4e2d\u4e86\u89e3\u6709\u5173\u6d88\u606f\u6846\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/p><h2 id=\"26-27-how-to-get-a-response-from-a-user\" class=\"wp-block-heading\"> 27. \u5982\u4f55\u83b7\u5f97\u7528\u6237\u7684\u56de\u590d\uff1f<\/h2><p>\u8981\u83b7\u53d6\u7528\u6237\u7684\u54cd\u5e94\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u8f93\u5165\u6846\uff0c\u8be5\u8f93\u5165\u6846\u5141\u8bb8\u7528\u6237\u5728\u8f93\u5165\u680f\u4e2d\u952e\u5165\u54cd\u5e94\uff0c\u7136\u540e\u6309\u201c\u786e\u5b9a\u201d\u63d0\u4ea4\u3002<\/p><h2 id=\"27-28-what-is-a-loop-in-vba\" class=\"wp-block-heading\"> 28.VBA\u4e2d\u4ec0\u4e48\u662f\u5faa\u73af\uff1f<\/h2><p>\u5faa\u73af\u662f\u4e00\u7ec4\u91cd\u590d\u591a\u6b21\u7684\u4ee3\u7801\u3002\u5728 VBA \u4e2d\uff0c\u5faa\u73af\u662f\u4e00\u79cd\u5b9a\u4e49\u5faa\u73af\u4e2d\u7684\u4ee3\u7801\u884c\u4ee5\u91cd\u590d\u5b83\u7684\u65b9\u6cd5\u3002\u5728 VBA \u4e2d\u7f16\u5199\u5faa\u73af\u6709\u591a\u79cd\u65b9\u6cd5\u3002<\/p><ul><li>\u5bf9\u4e8e\u5176\u4f59\u7684<\/li><li>\u5bf9\u4e8e\u63a5\u4e0b\u6765\u7684\u6bcf\u4e00\u4e2a<\/li><li>\u6267\u884c while \u5faa\u73af<\/li><li>\u8fdb\u5165\u5faa\u73af<\/li><\/ul><h2 id=\"28-29-how-to-test-conditions-in-vba\" class=\"wp-block-heading\">29.\u5982\u4f55\u5728VBA\u4e2d\u6d4b\u8bd5\u6761\u4ef6\uff1f<\/h2><p>\u5728VBA\u4e2d\uff0c\u6d4b\u8bd5\u6761\u4ef6\u6709\u4e24\u79cd\u4e3b\u8981\u65b9\u6cd5\uff0c\u53ef\u4ee5\u4f7f\u7528<a href=\"https:\/\/exceladvisor.org\/cn\/\u5982\u679c-2\/\">IF<\/a>\u548c<a href=\"https:\/\/exceladvisor.org\/cn\/\u9009\u62e9\u6848\u4f8b\/\">select-case<\/a>\u8bed\u53e5\u3002\u8fd9\u4e24\u79cd\u65b9\u6cd5\u7565\u6709\u4e0d\u540c\u3002\u4f7f\u7528 IF \u8bed\u53e5\uff0c\u60a8\u53ef\u4ee5\u4e00\u6b21\u6d4b\u8bd5\u4e00\u4e2a\u6761\u4ef6\uff08\u76f4\u5230\u60a8\u4f7f\u7528<a href=\"https:\/\/exceladvisor.org\/cn\/\u5d4c\u5957\u5982\u679c\/\">\u5d4c\u5957 IF<\/a> \uff09\uff0c\u800c\u4f7f\u7528 select case\uff0c\u60a8\u53ef\u4ee5\u6d4b\u8bd5\u591a\u4e2a\u6761\u4ef6\u3002<\/p><p><strong>\u66f4\u591a\uff1a<\/strong><a href=\"https:\/\/exceladvisor.org\/cn\/\u51fa\u53bb\u5982\u679c\/\">\u9000\u51fa IF<\/a> |<a href=\"https:\/\/exceladvisor.org\/cn\/\u5982\u679c\u548c\/\">\u5982\u679c\u548c<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5426\u5219\/\">\u5982\u679c\u4e0d\u662f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5982\u679c\u6216\/\">\u5982\u679c\u6216<\/a><\/p><h2 id=\"29-30-what-is-an-array-in-vba\" class=\"wp-block-heading\">30.VBA\u4e2d\u4ec0\u4e48\u662f\u6570\u7ec4\uff1f<\/h2><p> VBA \u4e2d\u7684\u8868\u5c31\u50cf\u4e00\u4e2a\u8ff7\u4f60\u6570\u636e\u5e93\uff0c\u7528\u4e8e\u5b58\u50a8\u548c\u7ec4\u7ec7\u6570\u636e\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60633\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/24-un-tableau-en-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u4e2d\u7684\u8868\" width=\"494\" height=\"292\"><\/figure><\/div><p>\u8981\u4f7f\u7528\u6570\u7ec4\uff0c\u5fc5\u987b\u9996\u5148\u58f0\u660e\u5b83\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60634\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/25-declarer-un-tableau.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u58f0\u660e\u4e00\u4e2a\u6570\u7ec4\" width=\"340\" height=\"396\"><\/figure><\/div><h2 id=\"30-31-do-we-have-functions-in-vba\" class=\"wp-block-heading\"> 31. VBA\u4e2d\u6709\u51fd\u6570\u5417\uff1f<\/h2><p>\u662f\u7684\uff0c\u6211\u4eec\u6709 VBA \u4e2d\u7684\u51fd\u6570\u3002\u4f7f\u7528\u8fd9\u4e9b\u51fd\u6570\u4e0e\u6211\u4eec\u5728\u7535\u5b50\u8868\u683c\u4e2d\u4f7f\u7528\u7684\u51fd\u6570\u76f8\u540c\u3002\u6211\u4eec\u9700\u8981\u4e3a\u67d0\u4e9b\u53c2\u6570\u8bbe\u7f6e\u503c\u624d\u80fd\u83b7\u5f97\u7ed3\u679c\uff08\u8bf7\u53c2\u9605\u6b64<a href=\"https:\/\/exceladvisor.org\/cn\/\u529f\u80fd\/\">\u51fd\u6570\u5217\u8868<\/a>\uff09\u3002<\/p><h2 id=\"31-32-do-we-need-to-deal-with-errors-in-vba\" class=\"wp-block-heading\"> 32.\u6211\u4eec\u9700\u8981\u5728VBA\u4e2d\u5904\u7406\u9519\u8bef\u5417\uff1f<\/h2><p>\u4e0e\u6240\u6709\u7f16\u7801\u8bed\u8a00\u4e00\u6837\uff0c\u60a8\u9700\u8981<a href=\"https:\/\/exceladvisor.org\/cn\/\u9519\u8bef\u5904\u7406\/\">\u5904\u7406 VBA \u4e2d\u7684\u9519\u8bef<\/a>\uff0c\u800c\u5904\u7406\u8fd9\u4e9b\u9519\u8bef\u7684\u6700\u4f73\u65b9\u6cd5\u662f\u4e86\u89e3\u5982\u4f55\u8c03\u8bd5\u4ee3\u7801\u5e76\u6e05\u695a\u7528\u6237\u53ef\u80fd\u540c\u65f6\u9762\u4e34\u7684\u6240\u6709\u53ef\u80fd\u9519\u8bef\u3002\u672a\u6765\u3002 \u3002\u60a8\u53ef\u80fd\u4f1a\u9047\u5230\u56db\u79cd\u7c7b\u578b\u7684\u9519\u8bef\uff1a<\/p><ol type=\"1\"><li>\u8bed\u6cd5\u9519\u8bef<\/li><li>\u7f16\u8bd1\u9519\u8bef<\/li><li>\u8fd0\u884c\u65f6\u9519\u8bef<\/li><li>\u903b\u8f91\u9519\u8bef<\/li><\/ol><p>\u4ee5\u4e0b\u662f\u60a8\u5728\u4e0d\u540c\u60c5\u51b5\u4e0b\u9700\u8981\u5904\u7406\u7684\u9519\u8bef\u5217\u8868\u3002<\/p><p><a href=\"https:\/\/exceladvisor.org\/cn\/\u7d22\u5f15\u9519\u8bef\u8d85\u51fa\u8303\u56f4-9\/\">\u7d22\u5f15\u8d85\u51fa\u8303\u56f4\uff08\u9519\u8bef 9\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u6267\u884c\u9519\u8bef1004\/\">\u6267\u884c\u65f6\u95f4\uff08\u9519\u8bef1004\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u9700\u8981\u5bf9\u8c61\u9519\u8bef-424\/\">\u9700\u8981\u5bf9\u8c61\uff08\u9519\u8bef 424\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u5185\u5b58\u4e0d\u8db3\u9519\u8bef7\/\">\u5185\u5b58\u4e0d\u8db3\uff08\u9519\u8bef 7\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u5bf9\u8c61\u4e0d\u652f\u6301\u6b64\u5c5e\u6027\u6216\u65b9\u6cd5\u9519\u8bef438\/\">\u8be5\u5bf9\u8c61\u4e0d\u652f\u6301\u6b64\u5c5e\u6027\u6216\u65b9\u6cd5\uff08\u9519\u8bef 438\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u65e0\u6548\u7684\u8fc7\u7a0b\u8c03\u7528\u6216\u53c2\u6570\u9519\u8bef-5\/\">\u65e0\u6548\u7684\u8fc7\u7a0b\u8c03\u7528\u6216\u53c2\u6570\uff08\u9519\u8bef 5\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u6ea2\u51fa\u9519\u8bef6\/\">\u6ea2\u51fa\uff08\u9519\u8bef 6\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u81ea\u52a8\u5316\u9519\u8bef-440\/\">\u81ea\u52a8\u5316\u9519\u8bef\uff08\u9519\u8bef 440\uff09<\/a> <em>&nbsp;<\/em> <em>|<\/em> <em>&nbsp;<\/em> <a href=\"https:\/\/exceladvisor.org\/cn\/\u9519\u8bef400\/\">VBA \u9519\u8bef 400<\/a> <em>|<\/em><a href=\"https:\/\/exceladvisor.org\/cn\/\u4e0d\u517c\u5bb9\u9519\u8bef\u7c7b\u578b-13\/\">\u7c7b\u578b\u4e0d\u5339\u914d\u9519\u8bef\uff08\u9519\u8bef 13\uff09<\/a><\/p><h2 id=\"32-33-how-to-debug-a-vba-code\" class=\"wp-block-heading\"> 33.\u5982\u4f55\u8c03\u8bd5VBA\u4ee3\u7801\uff1f<\/h2><p>\u5728 VBA \u4e2d\u8c03\u8bd5\u4ee3\u7801\u6709\u4e24\u79cd\u4e0d\u540c\u7684\u65b9\u6cd5\u3002\u7b2c\u4e00\u79cd\u662f\u4f7f\u7528\u7f16\u8bd1 VBA \u9879\u76ee\u9009\u9879\u3002\u5f53\u60a8\u4f7f\u7528\u6b64\u9009\u9879\u65f6\uff0c\u5b83\u4f1a\u5206\u6790\u4ee3\u7801\u7684\u6bcf\u4e00\u884c\u5e76\u8b66\u544a\u60a8\u4ee3\u7801\u4e2d\u662f\u5426\u5b58\u5728\u9519\u8bef\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60635\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/26-deboguer-un-code-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u8c03\u8bd5 vba \u4ee3\u7801\" width=\"411\" height=\"395\"><\/figure><\/div><p>\u7b2c\u4e8c\u79cd\u65b9\u5f0f\u662f\u9010\u884c\u8fd0\u884c\u6bcf\u4e00\u884c\u4ee3\u7801\uff0c\u68c0\u67e5\u4ee3\u7801\u662f\u5426\u6709\u9519\u8bef\u3002\u4e3a\u6b64\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u201cstep in\u201d\u9009\u9879\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 F8 \u5feb\u6377\u952e\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60636\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/27-etape-dans-loption.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4e00\u6b65\u6b65\u5728\u9009\u9879\u4e2d\" width=\"344\" height=\"395\"><\/figure><\/div><h2 id=\"33-34-how-to-use-a-worksheet-function-in-vba\" class=\"wp-block-heading\"> 34.\u5982\u4f55\u5728VBA\u4e2d\u4f7f\u7528\u5de5\u4f5c\u8868\u51fd\u6570\uff1f<\/h2><p>\u5728 VBA \u4e2d\uff0c\u6709\u4e00\u4e2a\u540d\u4e3a\u201c<a href=\"https:\/\/exceladvisor.org\/cn\/\u7535\u5b50\u8868\u683c\u529f\u80fd\/\">\u5de5\u4f5c\u8868\u51fd\u6570<\/a>\u201d\u7684\u5c5e\u6027\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528\u5b83\u6765\u8bbf\u95ee\u6240\u6709\u5de5\u4f5c\u8868\u51fd\u6570\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60637\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/28-utilisation-de-la-fonction-de-feuille-de-calcul-dans-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5728vba\u4e2d\u4f7f\u7528\u7535\u5b50\u8868\u683c\u529f\u80fd\" width=\"504\" height=\"319\"><\/figure><\/div><p>\u4e00\u65e6\u6211\u4eec\u9009\u62e9\u4e86\u8981\u4f7f\u7528\u7684\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u4e3a\u8be5\u51fd\u6570\u7684\u53c2\u6570\u6307\u5b9a\u503c\u5417\uff1f <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60638\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/29-specifier-des-valeurs-pour-les-arguments.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u6307\u5b9a\u53c2\u6570\u503c\" width=\"542\" height=\"263\"><\/figure><\/div><h2 id=\"34-35-what-is-a-user-define-function-udf\" class=\"wp-block-heading\"> 35. \u4ec0\u4e48\u662f\u7528\u6237\u5b9a\u4e49\u51fd\u6570\uff08UDF\uff09\uff1f<\/h2><p> UDF \u662f\u4e00\u4e2a\u81ea\u5b9a\u4e49\u51fd\u6570\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 VBA \u7684\u51fd\u6570\u8fc7\u7a0b\u5728 Excel \u4e2d\u521b\u5efa\u5b83\u3002\u5728\u4e0b\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u7f16\u5199\u4e86\u4ee3\u7801\u6765\u521b\u5efa\u4e00\u4e2a\u53ef\u4ee5\u4ece\u65e5\u671f\u8fd4\u56de\u65e5\u671f\u540d\u79f0\u7684\u51fd\u6570\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60639\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/30-fonctions-definies-par-lutilisateur.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u7528\u6237\u5b9a\u4e49\u51fd\u6570\" width=\"710\" height=\"270\"><\/figure><\/div><p>\u5982\u679c\u60a8\u770b\u5230\uff0c\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\uff0c\u6211\u4eec\u4e3a\u51fd\u6570\u5b9a\u4e49\u4e86\u4e00\u4e2a\u53c2\u6570 (InputDate)\uff0c\u7136\u540e\u4f7f\u7528\u8be5\u53c2\u6570\u7684\u503c\u6765\u8ba1\u7b97\u51fd\u6570\u7ed3\u679c\u3002\u67e5\u770b\u6b64\u94fe\u63a5\u4ee5<a href=\"https:\/\/exceladvisor.org\/cn\/\u7528\u6237\u5b9a\u4e49\u51fd\u65702\/\">\u4e86\u89e3\u66f4\u591a\u4fe1\u606f<\/a>\u3002<\/p><h2 id=\"35-36-how-to-use-a-personal-macro-workbook\" class=\"wp-block-heading\"> 36.\u5982\u4f55\u4f7f\u7528\u4e2a\u4eba\u5b8f\u5de5\u4f5c\u7c3f\uff1f<\/h2><p>\u60a8\u53ef\u4ee5\u5c06\u5b8f\u4fdd\u5b58\u5728\u4e2a\u4eba\u5b8f\u6587\u4ef6\u5939\u4e2d\uff0c\u4ee5\u4fbf\u4ece\u6240\u6709\u6587\u4ef6\u5939\u8bbf\u95ee\u5b83\u4eec\u3002\u5f53\u60a8\u6253\u5f00 Excel \u65f6\uff0c\u6bcf\u6b21\u90fd\u4f1a\u6253\u5f00\u4e2a\u4eba\u5b8f\u5de5\u4f5c\u7c3f\uff0c\u5e76\u5141\u8bb8\u60a8\u8bbf\u95ee\u4fdd\u5b58\u5728\u5176\u4e2d\u7684\u7403\u573a\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60640\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/31-cahier-de-macro-personnel.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u5b8f\u89c2\u4e2a\u4eba\u7c98\u5408\u5242\" width=\"467\" height=\"374\"><\/figure><\/div><p>\u5f55\u5236\u5b8f\u65f6\uff0c\u60a8\u53ef\u4ee5\u9009\u62e9\u4e00\u4e2a\u9009\u9879\u5c06\u8be5\u4ee3\u7801\u5b58\u50a8\u5728\u4e2a\u4eba\u5b8f\u7ed1\u5b9a\u5668\u4e2d\u3002\u5982\u679c\u5c1a\u4e0d\u5b58\u5728\u4e2a\u4eba\u5b8f\u7ed1\u5b9a\u7a0b\u5e8f\uff0c\u8fd9\u662f\u521b\u5efa\u4e2a\u4eba\u5b8f\u7ed1\u5b9a\u7a0b\u5e8f\u7684\u6700\u7b80\u5355\u65b9\u6cd5\u4e4b\u4e00\u3002\u4f60\u53ef\u4ee5<a href=\"https:\/\/exceladvisor.org\/cn\/\u4e2a\u4eba\u5b8f\u7b14\u8bb0\u672c\/\">\u5728\u8fd9\u91cc<\/a>\u627e\u5230\u66f4\u591a \u3002<\/p><h2 id=\"36-37-what-is-the-use-of-the-with-statement\" class=\"wp-block-heading\"> 37. \u201cwith\u201d\u8bed\u53e5\u7684\u76ee\u7684\u662f\u4ec0\u4e48\uff1f<\/h2><p>\u4f7f\u7528\u8be5\u8bed\u53e5\uff0c\u60a8\u53ef\u4ee5\u5f15\u7528\u4e00\u4e2a\u5bf9\u8c61\u4e00\u6b21\uff0c\u7136\u540e\u4f7f\u7528\u5b83\u6765\u8bbf\u95ee\u5176\u591a\u4e2a\u5c5e\u6027\u5e76\u4f7f\u7528\u591a\u4e2a\u65b9\u6cd5\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60641\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/32-utilisation-de-linstruction-with.png\" sizes=\"auto, \" srcset=\"\" alt=\"\u4f7f\u7528 with \u8bed\u53e5\" width=\"321\" height=\"250\"><\/figure><\/div><p>\u6b63\u5982\u60a8\u5728\u4e0a\u9762\u7684\u793a\u4f8b\u4e2d\u770b\u5230\u7684\uff0c\u6211\u4eec\u4f7f\u7528\u201cWith\u201d\u8bed\u53e5\u5f15\u7528\u4e86\u8303\u56f4 A1 \u7684\u5b57\u4f53\u5c5e\u6027\uff0c\u7136\u540e\u5b83\u5f15\u7528\u4e86\u4e09\u4e2a\u5c5e\u6027\u3002\u4f7f\u7528 with \u8bed\u53e5\u7684\u6700\u4f73\u90e8\u5206\u662f\u60a8\u4e0d\u9700\u8981\u4e00\u6b21\u53c8\u4e00\u6b21\u5730\u5f15\u7528\u4e3b\u5bf9\u8c61\u3002\u60a8\u53ef\u4ee5<a href=\"https:\/\/exceladvisor.org\/cn\/\u548c\/\">\u5728\u6b64\u5904<\/a>\u9605\u8bfb\u6709\u5173\u201cwith\u201d\u7684\u66f4\u591a\u4fe1\u606f\u3002<\/p><h2 id=\"37-38-what-is-the-use-of-the-goto-statement-in-vba\" class=\"wp-block-heading\"> 38.VBA\u4e2dGoTo\u8bed\u53e5\u7684\u4f5c\u7528\u662f\u4ec0\u4e48\uff1f<\/h2><p>\u5728 VBA \u4e2d\uff0c\u60a8\u53ef\u4ee5\u4f7f\u7528 go-to \u8bed\u53e5\u4ece\u4e00\u79cd\u4ee3\u7801\u79fb\u52a8\u5230\u53e6\u4e00\u79cd\u4ee3\u7801\u3002\u8981\u4f7f\u7528\u6b64\u8bed\u53e5\uff0c\u5fc5\u987b\u5728\u4ee3\u7801\u4e2d\u7684\u67d0\u5904\u521b\u5efa\u4e00\u4e2a\u6807\u7b7e\uff0c\u7136\u540e\u4f7f\u7528 go-to \u8bed\u53e5\u544a\u8bc9 VBA \u79fb\u81f3\u8be5\u6807\u7b7e\u3002\u8bf7\u53c2\u9605\u4ee5\u4e0b\u793a\u4f8b\uff0c\u5982\u679c\u60a8\u60f3\u4e86\u89e3\u66f4\u591a\u4fe1\u606f\uff0c<a href=\"https:\/\/exceladvisor.org\/cn\/\u8f6c\u52301\/\">\u8bf7\u67e5\u770b\u672c\u6559\u7a0b<\/a>\u3002 <\/p><div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-60642\" src=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/33-instruction-goto-en-vba.png\" sizes=\"auto, \" srcset=\"\" alt=\"VBA \u4e2d\u7684 goto \u8bed\u53e5\" width=\"432\" height=\"325\"><\/figure><\/div><h2 id=\"38-39-what-are-some-useful-tasks-that-you-can-do-using-vba\" class=\"wp-block-heading\"> 39. \u4f7f\u7528 VBA \u53ef\u4ee5\u5b8c\u6210\u54ea\u4e9b\u6709\u7528\u7684\u4efb\u52a1\uff1f<\/h2><p>\u4ee5\u4e0b\u662f\u60a8\u53ef\u4ee5\u4f7f\u7528 VBA \u4ee3\u7801\u6267\u884c\u7684\u4e00\u4e9b\u4e3b\u8981\u4efb\u52a1\u3002<\/p><p>\u6dfb\u52a0\u8fb9\u6846|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5b57\u7b26\u5b57\u4f53\/\">\u5b57\u4f53<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u8d8a\u7ebf\/\">\u6dfb\u52a0\u6362\u884c\u7b26<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u8bc4\u8bba\/\">\u6dfb\u52a0\u8bc4\u8bba<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u65b0\u961f\/\">\u6dfb\u52a0\u65b0\u884c<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5408\u5e76\/\">\u5408\u5e76\u5355\u5143\u683c<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u6587\u5b57\u6362\u884c-1\/\">\u6587\u5b57\u6362\u884c<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u7b49\u7761\u89c9\/\">\u6309\u4f4f\u548c\u7761\u7720\u63a7\u4ef6\u53ef\u6682\u505c\u548c\u5ef6\u8fdf<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u72b6\u6001\u680f1\/\">\u72b6\u6001\u680f<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u5c4f\u5e55\u66f4\u65b0\/\">\u5c4f\u5e55\u66f4\u65b0<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u968f\u673a\u6570\/\">\u751f\u6210\u968f\u673a\u6570<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u547d\u540d\u6d77\u6ee9\/\">\u547d\u540d\u8303\u56f4<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u7acb\u5373\u7a97\u53e3\u8c03\u8bd5\u6253\u5370\/\">\u7acb\u5373\u7a97\u53e3<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u6587\u672c\u6587\u4ef6\/\">\u521b\u5efa\u5e76\u5199\u5165\u6587\u672c\u6587\u4ef6<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u94fe\u67611\/\">\u8fde\u63a5<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u660e\u786e\u5185\u5bb91\/\">\u5185\u5bb9\u6e05\u6670<\/a>|<a href=\"https:\/\/exceladvisor.org\/cn\/\u81ea\u52a8\u8c03\u65741\/\">\u81ea\u52a8\u8c03\u8282<\/a><\/p>","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"ub_ctt_via":"","footnotes":""},"class_list":["post-46","page","type-page","status-publish","hentry"],"featured_image_src":null,"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09<\/title>\n<meta name=\"description\" content=\"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/exceladvisor.org\/cn\/\u9762\u8bd5\u95ee\u9898\/\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09\" \/>\n<meta property=\"og:description\" content=\"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/exceladvisor.org\/cn\/\u9762\u8bd5\u95ee\u9898\/\" \/>\n<meta property=\"og:site_name\" content=\"Excel Advisor\" \/>\n<meta property=\"article:modified_time\" content=\"2023-12-10T11:45:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/\",\"url\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/\",\"name\":\"39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09\",\"isPartOf\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png\",\"datePublished\":\"2023-11-18T00:56:48+00:00\",\"dateModified\":\"2023-12-10T11:45:11+00:00\",\"description\":\"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002\",\"breadcrumb\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage\",\"url\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u5bb6\",\"item\":\"https:\/\/exceladvisor.org\/cn\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Vba\u9762\u8bd5\u95ee\u9898\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/#website\",\"url\":\"https:\/\/exceladvisor.org\/cn\/\",\"name\":\"Excel Advisor\",\"description\":\"\u60a8\u7684\u6570\u636e\u7edf\u6cbb\u7ec8\u6781\u6307\u5357\",\"publisher\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/exceladvisor.org\/cn\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/#organization\",\"name\":\"Excel Advisor\",\"url\":\"https:\/\/exceladvisor.org\/cn\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/exceladvisor.org\/cn\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/exceladvisor.org\/cn\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"contentUrl\":\"https:\/\/exceladvisor.org\/cn\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png\",\"width\":105,\"height\":36,\"caption\":\"Excel Advisor\"},\"image\":{\"@id\":\"https:\/\/exceladvisor.org\/cn\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09","description":"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/exceladvisor.org\/cn\/\u9762\u8bd5\u95ee\u9898\/","og_locale":"zh_CN","og_type":"article","og_title":"39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09","og_description":"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002","og_url":"https:\/\/exceladvisor.org\/cn\/\u9762\u8bd5\u95ee\u9898\/","og_site_name":"Excel Advisor","article_modified_time":"2023-12-10T11:45:11+00:00","og_image":[{"url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"1 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/","url":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/","name":"39 VBA \u9762\u8bd5\u9898\u53ca\u7b54\u6848\uff082023 \u5e74\u6700\u65b0\uff09","isPartOf":{"@id":"https:\/\/exceladvisor.org\/cn\/#website"},"primaryImageOfPage":{"@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage"},"image":{"@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage"},"thumbnailUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png","datePublished":"2023-11-18T00:56:48+00:00","dateModified":"2023-12-10T11:45:11+00:00","description":"\u8fd9\u662f\u4e00\u4e9b\u6700\u91cd\u8981\u95ee\u9898\u7684\u5217\u8868\uff0c\u53ef\u7528\u4e8e\u7834\u89e3 VBA \u5f00\u53d1\u4eba\u5458\u9762\u8bd5\u3002","breadcrumb":{"@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/"]}]},{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#primaryimage","url":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png","contentUrl":"https:\/\/exceladvisor.org\/wp-content\/uploads\/2023\/08\/1-definir-la-gamme-2.png"},{"@type":"BreadcrumbList","@id":"https:\/\/exceladvisor.org\/cn\/%e9%9d%a2%e8%af%95%e9%97%ae%e9%a2%98\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u5bb6","item":"https:\/\/exceladvisor.org\/cn\/"},{"@type":"ListItem","position":2,"name":"Vba\u9762\u8bd5\u95ee\u9898"}]},{"@type":"WebSite","@id":"https:\/\/exceladvisor.org\/cn\/#website","url":"https:\/\/exceladvisor.org\/cn\/","name":"Excel Advisor","description":"\u60a8\u7684\u6570\u636e\u7edf\u6cbb\u7ec8\u6781\u6307\u5357","publisher":{"@id":"https:\/\/exceladvisor.org\/cn\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/exceladvisor.org\/cn\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-Hans"},{"@type":"Organization","@id":"https:\/\/exceladvisor.org\/cn\/#organization","name":"Excel Advisor","url":"https:\/\/exceladvisor.org\/cn\/","logo":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/exceladvisor.org\/cn\/#\/schema\/logo\/image\/","url":"https:\/\/exceladvisor.org\/cn\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","contentUrl":"https:\/\/exceladvisor.org\/cn\/wp-content\/uploads\/2023\/12\/exceladvisor.org_.png","width":105,"height":36,"caption":"Excel Advisor"},"image":{"@id":"https:\/\/exceladvisor.org\/cn\/#\/schema\/logo\/image\/"}}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"_links":{"self":[{"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/pages\/46","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/comments?post=46"}],"version-history":[{"count":1,"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/pages\/46\/revisions"}],"predecessor-version":[{"id":833,"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/pages\/46\/revisions\/833"}],"wp:attachment":[{"href":"https:\/\/exceladvisor.org\/cn\/wp-json\/wp\/v2\/media?parent=46"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}