{"id":514,"date":"2025-02-07T00:33:36","date_gmt":"2025-02-06T15:33:36","guid":{"rendered":"https:\/\/hajidai.com\/excel\/2025\/02\/excel%e6%a5%ad%e5%8b%99%e3%82%92%e9%9d%a9%e6%96%b0%e3%81%99%e3%82%8b%ef%bc%81%e4%b8%8a%e7%b4%9a%e8%80%85%e5%90%91%e3%81%91vba%e3%83%9e%e3%82%af%e3%83%ad%e6%9c%80%e9%81%a9%e5%8c%96%e3%83%86%e3%82%af\/"},"modified":"2025-02-07T00:33:36","modified_gmt":"2025-02-06T15:33:36","slug":"excel%e6%a5%ad%e5%8b%99%e3%82%92%e9%9d%a9%e6%96%b0%e3%81%99%e3%82%8b%ef%bc%81%e4%b8%8a%e7%b4%9a%e8%80%85%e5%90%91%e3%81%91vba%e3%83%9e%e3%82%af%e3%83%ad%e6%9c%80%e9%81%a9%e5%8c%96%e3%83%86%e3%82%af","status":"publish","type":"post","link":"https:\/\/hajidai.com\/excel\/2025\/02\/excel%e6%a5%ad%e5%8b%99%e3%82%92%e9%9d%a9%e6%96%b0%e3%81%99%e3%82%8b%ef%bc%81%e4%b8%8a%e7%b4%9a%e8%80%85%e5%90%91%e3%81%91vba%e3%83%9e%e3%82%af%e3%83%ad%e6%9c%80%e9%81%a9%e5%8c%96%e3%83%86%e3%82%af\/","title":{"rendered":"Excel\u696d\u52d9\u3092\u9769\u65b0\u3059\u308b\uff01\u4e0a\u7d1a\u8005\u5411\u3051VBA\u30de\u30af\u30ed\u6700\u9069\u5316\u30c6\u30af\u30cb\u30c3\u30af5\u9078"},"content":{"rendered":"<h2>\u4e0a\u7d1a\u8005\u5411\u3051\uff1a\u696d\u52d9\u52b9\u7387\u5316\u306e\u305f\u3081\u306eVBA\u30de\u30af\u30ed\u30b3\u30fc\u30c9<\/h2>\n<p>\u4ee5\u4e0b\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u306f\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u3092\u6700\u9069\u5316\u3057\u3001\u51e6\u7406\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\uff1a<\/p>\n<p>&#8220;`vba<br \/>\nSub OptimizeMemoryUsage()<br \/>\n    Application.ScreenUpdating = False<br \/>\n    Application.Calculation = xlCalculationManual<\/p>\n<p>    &#8216; \u30c7\u30fc\u30bf\u51e6\u7406\u306e\u30b3\u30fc\u30c9\u3092\u3053\u3053\u306b\u8a18\u8ff0<\/p>\n<p>    Application.Calculation = xlCalculationAutomatic<br \/>\n    Application.ScreenUpdating = True<br \/>\nEnd Sub<br \/>\n&#8220;`<\/p>\n<h3>1. VBA\u30e1\u30e2\u30ea\u6700\u9069\u5316\u306e\u91cd\u8981\u6027<\/h3>\n<p>Excel \u30de\u30af\u30ed\u3092\u4f7f\u7528\u3057\u3066\u5927\u898f\u6a21\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u3092\u884c\u3046\u5834\u5408\u3001\u30e1\u30e2\u30ea\u306e\u6700\u9069\u5316\u306f\u975e\u5e38\u306b\u91cd\u8981\u3067\u3059\u3002\u9069\u5207\u306a\u6700\u9069\u5316\u3092\u884c\u308f\u306a\u3044\u3068\u3001\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u901f\u5ea6\u304c\u9045\u304f\u306a\u3063\u305f\u308a\u3001\u6700\u60aa\u306e\u5834\u5408\u306fExcel\u304c\u30d5\u30ea\u30fc\u30ba\u3057\u3066\u3057\u307e\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u30e1\u30e2\u30ea\u6700\u9069\u5316\u306e\u30dd\u30a4\u30f3\u30c8\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3059\uff1a<\/p>\n<p>&#8211; \u4e0d\u8981\u306a\u5909\u6570\u3092\u524a\u9664\u3057\u3001\u5fc5\u8981\u6700\u5c0f\u9650\u306e\u5909\u6570\u306e\u307f\u3092\u4f7f\u7528\u3059\u308b<br \/>\n&#8211; \u5927\u304d\u306a\u914d\u5217\u3084\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u4f7f\u7528\u3059\u308b\u969b\u306f\u3001\u4f7f\u7528\u5f8c\u3059\u3050\u306b\u89e3\u653e\u3059\u308b<br \/>\n&#8211; \u30eb\u30fc\u30d7\u51e6\u7406\u306e\u4e2d\u3067\u65b0\u3057\u3044\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3059\u308b\u5834\u5408\u306f\u3001\u30eb\u30fc\u30d7\u7d42\u4e86\u6642\u306b\u5fc5\u305a\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u89e3\u653e\u3059\u308b<\/p>\n<p>\u3053\u308c\u3089\u306e\u70b9\u306b\u6ce8\u610f\u3059\u308b\u3053\u3068\u3067\u3001Excel \u30de\u30af\u30ed\u306e\u5b9f\u884c\u52b9\u7387\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>2. \u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5236\u5fa1\u306e\u30c6\u30af\u30cb\u30c3\u30af<\/h3>\n<p>\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\uff08\u4e0d\u8981\u306b\u306a\u3063\u305f\u30e1\u30e2\u30ea\u3092\u81ea\u52d5\u7684\u306b\u89e3\u653e\u3059\u308b\u6a5f\u80fd\uff09\u306e\u5236\u5fa1\u3082\u3001VBA\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u306b\u91cd\u8981\u3067\u3059\u3002\u4ee5\u4e0b\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u6d3b\u7528\u3057\u307e\u3057\u3087\u3046\uff1a<\/p>\n<p>&#8211; Set \u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u4f7f\u7528\u3057\u3066\u660e\u793a\u7684\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u5909\u6570\u3092 Nothing \u306b\u8a2d\u5b9a\u3057\u3001\u30e1\u30e2\u30ea\u3092\u89e3\u653e\u3059\u308b<br \/>\n&#8211; \u5927\u898f\u6a21\u306a\u30eb\u30fc\u30d7\u51e6\u7406\u306e\u4e2d\u3067\u5468\u671f\u7684\u306b CollectGarbage \u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3057\u3001\u5f37\u5236\u7684\u306b\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u3092\u5b9f\u884c\u3059\u308b<br \/>\n&#8211; \u51e6\u7406\u306e\u7d42\u4e86\u6642\u306b Application.ScreenUpdating \u30d7\u30ed\u30d1\u30c6\u30a3\u3092 True \u306b\u8a2d\u5b9a\u3057\u3001\u753b\u9762\u306e\u66f4\u65b0\u3092\u518d\u958b\u3059\u308b<\/p>\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u99c6\u4f7f\u3059\u308b\u3053\u3068\u3067\u3001\u30e1\u30e2\u30ea\u30ea\u30fc\u30af\u3092\u9632\u304e\u3001\u5b89\u5b9a\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30e0\u306e\u5b9f\u884c\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<h3>3. \u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u306e\u305f\u3081\u306e\u8ffd\u52a0\u30c6\u30af\u30cb\u30c3\u30af<\/h3>\n<p>\u30e1\u30e2\u30ea\u6700\u9069\u5316\u3068\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5236\u5fa1\u306b\u52a0\u3048\u3066\u3001\u4ee5\u4e0b\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3082 Excel \u30de\u30af\u30ed\u306e\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u5411\u4e0a\u306b\u5f79\u7acb\u3061\u307e\u3059\uff1a<\/p>\n<p>&#8211; Application.Calculation \u30d7\u30ed\u30d1\u30c6\u30a3\u3092 xlCalculationManual \u306b\u8a2d\u5b9a\u3057\u3001\u5927\u91cf\u306e\u30bb\u30eb\u8a08\u7b97\u3092\u4e00\u6642\u7684\u306b\u505c\u6b62\u3059\u308b<br \/>\n&#8211; With \u30b9\u30c6\u30fc\u30c8\u30e1\u30f3\u30c8\u3092\u4f7f\u7528\u3057\u3066\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3078\u306e\u53c2\u7167\u56de\u6570\u3092\u6e1b\u3089\u3059<br \/>\n&#8211; \u53ef\u80fd\u306a\u9650\u308a\u3001\u30bb\u30eb\u306e\u5024\u3092\u76f4\u63a5\u64cd\u4f5c\u3059\u308b\u306e\u3067\u306f\u306a\u304f\u3001\u914d\u5217\u306b\u8aad\u307f\u8fbc\u3093\u3067\u51e6\u7406\u3092\u884c\u3046<\/p>\n<p>\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u7d44\u307f\u5408\u308f\u305b\u308b\u3053\u3068\u3067\u3001Excel \u30de\u30af\u30ed\u306e\u5b9f\u884c\u901f\u5ea6\u3092\u5927\u5e45\u306b\u5411\u4e0a\u3055\u305b\u3001\u3088\u308a\u52b9\u7387\u7684\u306a\u30c7\u30fc\u30bf\u51e6\u7406\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<p>\u4e0a\u7d1a\u8005\u304c\u6975\u3081\u308b\u3053\u308c\u3089\u306eVBA\u30e1\u30e2\u30ea\u6700\u9069\u5316\u30c6\u30af\u30cb\u30c3\u30af\u3068\u30ac\u30d9\u30fc\u30b8\u30b3\u30ec\u30af\u30b7\u30e7\u30f3\u5236\u5fa1\u3092\u7fd2\u5f97\u3059\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u9ad8\u5ea6\u306a Excel \u30de\u30af\u30ed\u306e\u958b\u767a\u304c\u53ef\u80fd\u306b\u306a\u308a\u307e\u3059\u3002\u65e5\u3005\u306e\u696d\u52d9\u52b9\u7387\u5316\u306b\u5411\u3051\u3066\u3001\u305c\u3072\u3053\u308c\u3089\u306e\u30c6\u30af\u30cb\u30c3\u30af\u3092\u6d3b\u7528\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e0a\u7d1a\u8005\u5411\u3051\uff1a\u696d\u52d9\u52b9\u7387\u5316\u306e\u305f\u3081\u306eVBA\u30de\u30af\u30ed\u30b3\u30fc\u30c9 \u4ee5\u4e0b\u306e\u30de\u30af\u30ed\u30b3\u30fc\u30c9\u306f\u3001\u5927\u91cf\u306e\u30c7\u30fc\u30bf\u3092\u51e6\u7406\u3059\u308b\u969b\u306e\u30e1\u30e2\u30ea\u4f7f\u7528\u3092\u6700\u9069\u5316\u3057\u3001\u51e6\u7406\u901f\u5ea6\u3092\u5411\u4e0a\u3055\u305b\u307e\u3059\uff1a #8220;`vba Sub OptimizeMemoryUsage()<\/p>\n","protected":false},"author":2,"featured_media":513,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-advanced"],"_links":{"self":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/comments?post=514"}],"version-history":[{"count":0,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/posts\/514\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media\/513"}],"wp:attachment":[{"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/media?parent=514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/categories?post=514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hajidai.com\/excel\/wp-json\/wp\/v2\/tags?post=514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}