{"id":2177,"date":"2016-07-16T20:36:40","date_gmt":"2016-07-16T11:36:40","guid":{"rendered":"http:\/\/1bed.allright.life\/?p=2177"},"modified":"2020-04-18T21:26:42","modified_gmt":"2020-04-18T12:26:42","slug":"post-2177","status":"publish","type":"post","link":"https:\/\/1bed.allright.life\/?p=2177","title":{"rendered":"[Excel VBA]2 \u6b21\u5143\u3067\u30ad\u30fc\u5272\u308c\u3057\u306a\u3044\u3068\u3044\u3051\u306a\u304f\u306a\u3063\u305f"},"content":{"rendered":"<p>2 \u6b21\u5143\u3067\u30ad\u30fc\u5272\u308c\u3068\u3044\u3046\u8868\u73fe\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u306f\u30c1\u30e7\u30c3\u30c8\u5224\u3089\u306a\u3044\u304c\u3001\u5217\u3054\u3068\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3044\u3063\u3066\u3001\u30ad\u30fc\u5272\u308c\u304c\u884c\u308f\u308c\u308b\u3068\u305d\u306e\u884c\u306e\u6b21\u306e\u884c\u304c\u30b9\u30bf\u30fc\u30c8\u3068\u306a\u3063\u3066\u307e\u305f\u5217\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3068\u3044\u3046\u51e6\u7406\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u81ea\u5b85\u3067\u5148\u306b\u7d20\u632f\u308a\u3057\u305f\u30e1\u30e2\u3002<\/p>\n<h2>\u4ed5\u69d8<\/h2>\n<ul>\n<li>1 \uff5e 10 \u306e\u4e71\u6570\u3092\u4f5c\u6210\u3057\u3001\u305d\u308c\u3092 A \u5217\uff5e J \u5217\u3068\u3059\u308b<\/li>\n<li>\u4e71\u6570\u306b\u6cbf\u3063\u305f\u30bb\u30eb\u3092\u7740\u8272\u3059\u308b<\/li>\n<li>\u65e2\u306b\u7740\u8272\u6e08\u307f\u306e\u6642\u306f\u3001\u305d\u306e\u6b21\u306e\u884c\u306e\u30bb\u30eb\u3092\u7740\u8272\u3059\u308b<\/li>\n<li>A \u5217\uff5e J \u5217\u306e\u3044\u305a\u308c\u304b\u304c 5 \u3067\u5272\u308a\u5207\u308c\u308b\u884c\u306b\u5230\u9054\u3057\u305f\u3089\u3001\u305d\u306e\u6b21\u306e\u884c\u3092\u30b9\u30bf\u30fc\u30c8\u30e9\u30a4\u30f3\u3068\u3057\u3066\u5168\u5217\u30b9\u30bf\u30fc\u30c8\u3059\u308b<\/li>\n<li>\u4e0a\u8a18\u306e\u51e6\u7406\u3092\u7e70\u308a\u8fd4\u3059<\/li>\n<\/ul>\n<h2>\u7d50\u679c<\/h2>\n<p><img decoding=\"async\" src=\"http:\/\/1bed.allright.life\/wp-content\/uploads\/2016\/07\/GIF.gif\" alt=\"\" \/><\/p>\n<h2>\u30b3\u30fc\u30c9<\/h2>\n<pre><code class=\"language-vbnet\">Declare Sub Sleep Lib &quot;kernel32&quot; (ByVal dwMilliseconds As Long)\n\nPublic Sub RamdomStack()\n    Dim ViewSheet As Worksheet\n    Set ViewSheet = ThisWorkbook.Worksheets(&quot;Sheet1&quot;)\n\n    &#039; Adjst\n    With ViewSheet.Cells.Columns\n        .Clear\n        .ColumnWidth = 3\n        .Font.Size = 8\n        .HorizontalAlignment = xlCenter\n    End With\n\n    Dim Row As Long\n    Dim Column As Integer\n    Dim BreakPoint As Integer: BreakPoint = 1\n    Const BreakCount As Integer = 5\n\n    For i = 0 To 120\n        Column = Int(Rnd * 10) + 1\n\n        Row = BreakPoint\n        If ViewSheet.Cells(Row, Column).Value &lt;&gt; &quot;&quot; Then\n            Row = ViewSheet.Cells(Rows.Count, Column).End(xlUp).Row\n            If ViewSheet.Cells(Row, Column).Value &lt;&gt; &quot;&quot; Then\n                Row = Row + 1\n            End If\n        End If\n\n        &#039; Decoration\n        With ViewSheet.Cells(Row, Column)\n            .Value = &quot; &quot;\n            .Interior.Color = RGB(255, 200, 0)\n        End With\n\n        If (Row Mod BreakCount) = 0 And (Row + 1) &gt;= BreakPoint Then\n            BreakPoint = BreakPoint + BreakCount\n        End If\n\n        Call Sleep(300)\n    Next\n\n    Set ViewSheet = Nothing\nEnd Sub<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>2 \u6b21\u5143\u3067\u30ad\u30fc\u5272\u308c\u3068\u3044\u3046\u8868\u73fe\u304c\u6b63\u3057\u3044\u304b\u3069\u3046\u304b\u306f\u30c1\u30e7\u30c3\u30c8\u5224\u3089\u306a\u3044\u304c\u3001\u5217\u3054\u3068\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3044\u3063\u3066\u3001\u30ad\u30fc\u5272\u308c\u304c\u884c\u308f\u308c\u308b\u3068\u305d\u306e\u884c\u306e\u6b21\u306e\u884c\u304c\u30b9\u30bf\u30fc\u30c8\u3068\u306a\u3063\u3066\u307e\u305f\u5217\u306b\u30c7\u30fc\u30bf\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3068\u3044\u3046\u51e6\u7406\u304c\u5fc5\u8981\u306b\u306a\u3063\u305f\u306e\u3067\u3001\u81ea\u5b85\u3067\u5148\u306b\u7d20 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[97,96],"class_list":["post-2177","post","type-post","status-publish","format-standard","hentry","category-program","tag-excel","tag-vba"],"_links":{"self":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2177","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2177"}],"version-history":[{"count":6,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2177\/revisions"}],"predecessor-version":[{"id":3153,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=\/wp\/v2\/posts\/2177\/revisions\/3153"}],"wp:attachment":[{"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2177"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2177"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1bed.allright.life\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2177"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}