{"id":2562,"date":"2015-07-14T07:20:02","date_gmt":"2015-07-13T22:20:02","guid":{"rendered":"http:\/\/excelwork.info\/excel\/?p=2562"},"modified":"2015-07-14T07:20:02","modified_gmt":"2015-07-13T22:20:02","slug":"cellautofit","status":"publish","type":"post","link":"https:\/\/excelwork.info\/excel\/cellautofit\/","title":{"rendered":"\u30bb\u30eb\u306e\u5e45\u30fb\u9ad8\u3055\u306e\u81ea\u52d5\u8abf\u6574\uff08AutoFit \u30e1\u30bd\u30c3\u30c9\uff09"},"content":{"rendered":"<h2>AutoFit \u30e1\u30bd\u30c3\u30c9<\/h2>\n<div class=\"m30-l\">\n<p><strong>AutoFit \u30e1\u30bd\u30c3\u30c9<\/strong>\u306f\u3001\u6307\u5b9a\u3057\u305f\u30bb\u30eb\u30fb\u30bb\u30eb\u7bc4\u56f2\uff08Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\uff09\u306e<strong>\u9ad8\u3055<\/strong>\u307e\u305f\u306f<strong>\u5e45<\/strong>\u3092<strong>\u81ea\u52d5\u8abf\u6574<\/strong>\u3057\u307e\u3059\u3002<\/p>\n<br \/>\n<div class=\"kkbox\"><strong>\u3010\u66f8\u5f0f\u3011<\/strong><\/p>\n<p>    <em>Object<\/em>.<strong>AutoFit<\/strong><\/p><\/div>\n<h3>\u5f15\u6570\u30fb\u623b\u308a\u5024<\/h3>\n<ul style=\"margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;\">\n<li>object&nbsp;&nbsp;\u30fb\u30fb\u30fb&nbsp;&nbsp;\u5bfe\u8c61\u3068\u306a\u308b <span class=\"red\"><strong>Range \u30aa\u30d6\u30b8\u30a7\u30af\u30c8<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u307e\u3059\u3002<\/li>\n<\/ul>\n<\/div>\n<br \/><br \/>\n<h2>AutoFit \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b<\/h2>\n<div class=\"m30-l\">\n<h3 id=\"vba_sample\">\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9<\/h3>\n<pre class=\"lang:vb mark:0 decode:true \" title=\"AutoFit \u30e1\u30bd\u30c3\u30c9 \u4f7f\u7528\u4f8b\" data-url=\"http:\/\/example.co.jp\" >\r\n\u3000\r\nSub Sample_AutoFit()\r\n\r\n    'C\u5217\u3001D\u5217\u3001E\u5217\u306e\u5217\u5e45\u81ea\u52d5\u8abf\u6574\r\n    Range(\"C1:E4\").Columns.AutoFit\r\n    \r\n    'A\u5217\u306e\u5217\u5e45\u81ea\u52d5\u8abf\u6574\r\n    Range(\"A1\").EntireColumn.AutoFit\r\n    \r\n    'B\u5217\u3001C\u5217\u306e\u5217\u5e45\u81ea\u52d5\u8abf\u6574\r\n    Columns(\"B:C\").AutoFit\r\n\r\n    '3\u884c\u76ee\u304b\u30897\u884c\u76ee\u307e\u3067\u306e\u884c\u306e\u9ad8\u3055\u3092\u81ea\u52d5\u8abf\u6574\r\n    Rows(\"3:7\").AutoFit\r\n    \r\n    '\u30b7\u30fc\u30c8\u5168\u4f53\u306e\u884c\u306e\u9ad8\u3055\u3092\u81ea\u52d5\u8abf\u6574\r\n    Cells.Rows.AutoFit\r\n    \r\n    '\u30b7\u30fc\u30c8\u5168\u4f53\u306e\u5217\u5e45\u3092\u81ea\u52d5\u8abf\u6574\r\n    Cells.Columns.AutoFit\r\n    \r\n    '\u30b7\u30fc\u30c8\u5168\u4f53\u306e\u5217\u5e45\u3092\u81ea\u52d5\u8abf\u6574\r\n    Cells.EntireColumn.AutoFit\r\n    \r\n    '\u30b7\u30fc\u30c8\u5168\u4f53\u306e\u884c\u306e\u9ad8\u3055\u3092\u81ea\u52d5\u8abf\u6574\r\n    Cells.EntireRow.AutoFit\r\n    \r\n\r\nEnd Sub\r\n\u3000\r\n<\/pre>\n<br \/>\n<h3>\u5b9f\u884c\u7d50\u679c<\/h3>\n<p>\u30b5\u30f3\u30d7\u30ebVBA\u30bd\u30fc\u30b9\u5b9f\u884c\u524d<\/p>\n<p><a href=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit01.jpg?ssl=1\" rel=\"lightbox[2562]\"><img loading=\"lazy\" src=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit01.jpg?resize=400%2C246&#038;ssl=1\" alt=\"AutoFit \u30e1\u30bd\u30c3\u30c9 \u4f8b01\" width=\"400\" height=\"246\" class=\"alignnone size-medium wp-image-2564\" srcset=\"https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit01.jpg?resize=400%2C246&amp;ssl=1 400w, https:\/\/i0.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit01.jpg?w=539&amp;ssl=1 539w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><br \/>\n<\/p>\n<p>\u5b9f\u884c\u5f8c<\/p>\n<p><a href=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit02.jpg?ssl=1\" rel=\"lightbox[2562]\"><img loading=\"lazy\" src=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit02.jpg?resize=400%2C222&#038;ssl=1\" alt=\"AutoFit \u30e1\u30bd\u30c3\u30c9 \u4f8b02\" width=\"400\" height=\"222\" class=\"alignnone size-medium wp-image-2565\" srcset=\"https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit02.jpg?resize=400%2C222&amp;ssl=1 400w, https:\/\/i1.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit02.jpg?w=531&amp;ssl=1 531w\" sizes=\"(max-width: 400px) 100vw, 400px\" data-recalc-dims=\"1\" \/><\/a><\/p>\n<\/div>\n<br \/>\n","protected":false},"excerpt":{"rendered":"<p>AutoFit \u30e1\u30bd\u30c3\u30c9 AutoFit \u30e1\u30bd\u30c3\u30c9\u306f\u3001\u6307\u5b9a\u3057\u305f\u30bb\u30eb\u30fb\u30bb\u30eb\u7bc4\u56f2\uff08R &#8230; <\/p>\n","protected":false},"author":1,"featured_media":2608,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"amp_status":"","spay_email":"","jetpack_publicize_message":""},"categories":[268],"tags":[387,270,63,38,269,389,388],"jetpack_featured_media_url":"https:\/\/i2.wp.com\/excelwork.info\/excel\/wp\/wp-content\/uploads\/2015\/07\/autofit01-400x2461.jpg?fit=400%2C246&ssl=1","jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4Ye9i-Fk","_links":{"self":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2562"}],"collection":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/comments?post=2562"}],"version-history":[{"count":4,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2562\/revisions"}],"predecessor-version":[{"id":2607,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/posts\/2562\/revisions\/2607"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media\/2608"}],"wp:attachment":[{"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/media?parent=2562"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/categories?post=2562"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/excelwork.info\/excel\/wp-json\/wp\/v2\/tags?post=2562"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}