{"id":4051,"date":"2014-02-21T12:59:29","date_gmt":"2014-02-21T03:59:29","guid":{"rendered":"http:\/\/www.ka-net.org\/blog\/?p=4051"},"modified":"2014-02-21T12:59:29","modified_gmt":"2014-02-21T03:59:29","slug":"%e6%96%87%e5%ad%97%e5%88%97%e3%82%92%e6%8c%87%e5%ae%9a%e3%81%97%e3%81%9f%e6%96%87%e5%ad%97%e6%95%b0%e3%81%a7%e5%88%86%e5%89%b2%e3%81%99%e3%82%8bvba%e9%96%a2%e6%95%b0","status":"publish","type":"post","link":"https:\/\/www.ka-net.org\/blog\/?p=4051","title":{"rendered":"\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u305f\u6587\u5b57\u6570\u3067\u5206\u5272\u3059\u308bVBA\u95a2\u6570"},"content":{"rendered":"<p><em>&#8220;01234567890123456789012\u2026&#8221;<\/em>\u3068\u3044\u3046\u3088\u3046\u306a\u9577\u3044\u6587\u5b57\u5217\u3092\u4e00\u5b9a\u306e\u6587\u5b57\u6570\u3067\u533a\u5207\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u7c21\u5358\u306b\u51e6\u7406\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">Option Explicit\r\n\r\nPublic Sub Sample()\r\n  Dim v As Variant\r\n  Dim s As String\r\n  \r\n  s = &quot;01234567890123456789012&quot;\r\n  s = s &amp; &quot;34567890123456789012345&quot;\r\n  s = s &amp; &quot;67890123456789012345678&quot;\r\n  s = s &amp; &quot;90123456789012345678901&quot;\r\n  s = s &amp; &quot;23456789012345678901234&quot;\r\n  s = s &amp; &quot;56789012345678901234567&quot;\r\n  s = s &amp; &quot;89012345678901234567890&quot;\r\n  s = s &amp; &quot;12345678901234567890123&quot;\r\n  s = s &amp; &quot;45678901234567890123456&quot;\r\n  s = s &amp; &quot;7890123456789012345&quot;\r\n  \r\n  v = SplitStr(s, 10)\r\n  Debug.Print s\r\n  Debug.Print &quot;----------&quot;\r\n  Debug.Print Join(v, vbCrLf)\r\nEnd Sub\r\n\r\nPrivate Function SplitStr(ByVal TargetStr As String, ByVal StrLength As Long) As Variant\r\n'\u6587\u5b57\u5217\u3092\u6307\u5b9a\u3057\u305f\u6587\u5b57\u6570\u3067\u5206\u5272\r\n  Dim v As Variant\r\n  Dim n As Long\r\n  Dim i As Long\r\n  \r\n  n = 0 '\u521d\u671f\u5316\r\n  ReDim v(0 To Round(Len(TargetStr) \/ StrLength - 0.5, 0)) '\u5207\u308a\u6368\u3066\r\n  For i = 1 To Len(TargetStr) Step StrLength\r\n    v(n) = Mid(TargetStr, i, StrLength)\r\n    n = n + 1\r\n  Next\r\n  SplitStr = v\r\nEnd Function<\/pre>\n<p>\u4e0a\u8a18SplitStr\u95a2\u6570\u306f\u3001\u6307\u5b9a\u3057\u305f\u6587\u5b57\u6570\u3067\u6587\u5b57\u5217\u3092\u5206\u5272\u3057\u3066\u7d50\u679c\u3092Variant\u578b\u306e\u914d\u5217\u3067\u8fd4\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"&#8220;01234567890123456789012\u2026&#8221;\u3068\u3044\u3046\u3088\u3046\u306a\u9577\u3044\u6587\u5b57\u5217\u3092\u4e00\u5b9a\u306e\u6587\u5b57\u6570\u3067\u533a\u5207\u308b\u5fc5\u8981\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u7c21\u5358\u306b\u51e6\u7406\u3092\u8003\u3048\u3066\u307f\u307e\u3057\u305f\u3002 Option Explicit Public Sub [&hellip;]","protected":false},"author":1,"featured_media":7111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[4,48,49],"tags":[],"class_list":["post-4051","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-office","category-excel-office","category-word-office"],"aioseo_notices":[],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.ka-net.org\/blog\/wp-content\/uploads\/eyecatch-Excel.png","jetpack_shortlink":"https:\/\/wp.me\/p4UZZr-13l","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4051"}],"version-history":[{"count":1,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4051\/revisions"}],"predecessor-version":[{"id":4052,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/posts\/4051\/revisions\/4052"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=\/wp\/v2\/media\/7111"}],"wp:attachment":[{"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ka-net.org\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}