忍者ブログ
日常だったりネタだったり作品の進捗だったり……色々書きます。不定期に。
09
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 管理画面

    VBA「演習-学生名簿」続き9

    こんばんは若槻です。本日いきなり仕事が増えました。
    仕事があるのはいいんです。だが何で暇な時と忙しい時の
    波が激しいんだ((゜д゜;))!?
    大波小波にもほどがある……orz



    さて、本日は昨日の続きです。
    って言っても、たいしたことじゃないです。長いだけ。


    ====================================================
    ◎システム名 「演習-学生名簿」
    ====================================================
    ~現在ある内容~
    ・グループ分け      ←終了
    ・学年別  ←簡単1      ←終了
    ・学校別         ←終了
    ・性別ごと ←簡単2   ←終了
    ・配役配置        ←終了
    ・試合          ←終了
    ・検索
    ・選抜          ←終了
    ・動き
    ・条件別グループ分け

    本日は「動き」の続きをおしゃべりします。

    9.動き
    ○やりたいこと
    これは番外のお遊びソースですね。
    学生名簿演習には正直直接関係はありません。
    遊び道具を作りたい方は、って感じでしょうか^^;

    ではスタート。


    ○ソース
    ~~~~~~~ソース3.-ここから~~~~~~~~
    '=======================================================
    '動作-文字タイプ
    '=======================================================
    Sub MojiType()
    [1]
      SheetSet
      WH13.Range("X1:BG50").Interior.Pattern = xlPatternNone
     
      LG = 2   '塗りつぶし用-行
      LR = 25  '塗りつぶし用-列
     
    [2]
      Kotoba2 = InputBox(Title:="入力", prompt:="アルファベットで入力してください。" & _
                Chr(10) & Chr(13) & "@マークで改行されます")
      If Kotoba2 = "" Then
        Exit Sub
      End If
     
    [3]
      Ren = Len(Kotoba2)
      j = 1  'Kotoba2を回す用
      Do Until j > Ren
        Kotoba = Mid(Kotoba2, j, 1)
        If Kotoba = "@" Then
          LR = 25
          LG = LG + 8
        Else
          Alphabet
          If LR >= 50 Then
            LR = 25
            LG = LG + 8
          Else
            LR = LR + 2
          End If
        End If
        j = j + 1
      Loop
    End Sub
    ~~~~~~~ソース3.-ここまで~~~~~~~~

    ソース3でやってること→アニメーション2、文字タイプ
    △これはインプットボックスに入力した値がExcel上に記述されていくソースです。
     ただし動作するのは英大文字のみとなっています。
     小文字で入れても大文字で入れても全部大文字です
     
    [1]初期動作→塗りつぶしをなくしたり変数の値を初期値にする
    [2]記述したい言葉を入力し、変数Kotoba2に代入。
     何も入力しなかった場合は処理を抜ける
    MessageBox1.JPG







    MessageBox2.JPG








    [3]上の処理で「Excel」と入力したのを前提とします。
     1.変数RenにKotoba2の文字数を入れる(今回は5文字)
     2.変数KotobaにKotoba2のj番目から1文字分を格納
     3.Kotobaが「@」の場合は列数のLRを初期値に戻し、現在の行数に8を足す
     「@」以外の時はマクロ「Alphabet」を呼び出して実行。
     それから列数が50以上の時は列数を初期値に戻し、行数に8を追加。
     列数が50を超えていない場合は列数に2を追加する。

    Kekka1.JPG










    ☆ 以下に記すのはマクロ「Alphabet」です。長いのでご注意を ☆
    ~~~~~~~ソース4.-ここから~~~~~~~~
    =======================================================
    'アルファベットごとに塗りつぶしを変える
    '=======================================================
    Sub Alphabet()
      Select Case Kotoba
        '◆◇◆ A ◆◇◆
        Case "A", "a"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ B ◆◇◆
        Case "B", "b"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 3, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
         
        '◆◇◆ C ◆◇◆
        Case "C", "c"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          WH13.Cells(LG + 2, LR).Interior.Pattern = xlPatternNone
         
         
        '◆◇◆ D ◆◇◆
        Case "D", "d"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG + 1
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ E ◆◇◆
        Case "E", "e"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
         
        '◆◇◆ F ◆◇◆
        Case "F", "f"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
         
        '◆◇◆ G ◆◇◆
        Case "G", "g"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
         
         
        '◆◇◆ H ◆◇◆
        Case "H", "h"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop


        '◆◇◆ I ◆◇◆
        Case "I", "i"
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓3列目
          LR = LR + 1
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h


        '◆◇◆ J ◆◇◆
        Case "J", "j"
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 And i <> LG + 2 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h


        '◆◇◆ K ◆◇◆
        Case "K", "k"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 3, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h


        '◆◇◆ L ◆◇◆
        Case "L", "l"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
        
       
        '◆◇◆ M ◆◇◆
        Case "M", "m"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ N ◆◇◆
        Case "N", "n"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1
          WH13.Cells(LG + 3, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          

    ※ソース4の残りは追記の中に格納しています。

    ~~~~~~~ソース4.-ここまで~~~~~~~~


    'ソース4でやってること→文字タイプ、アルファベットに塗りつぶし
     △長いですがやっているのはその文字になるように1セルずつ
      塗りつぶしているだけです。
      今回は徐々に描かれるようにしているので
      「For h = 1 To 10000
            DoEvents
          Next h」
      が、入ります。これがないと一気に塗られます。

     ※うまく入りきらなかったものがやけに広くなったり大きくなったり
      していますので、もしこのプログラムを実行なさった方がいらっしゃり、
      「なんか違和感ある」と思われたらどうぞ改変なさってください。
      そして若槻に教えてくだs(ry

    a489c499.JPG















     

    ~~~~~~~ソース5.-ここから~~~~~~~~
    '=======================================================
    '塗りつぶし無しにする
    '=======================================================
    Sub NothingColor()
      SheetSet
      WH13.Cells.Interior.Pattern = xlPatternNone
    End Sub
    ~~~~~~~ソース5.-ここまで~~~~~~~~

    ソース5でやってること→シート「動き」の塗りつぶしを全て無しにする

     

    以上で「動き」は終了です。
    お疲れ様でした。


     





          
        '◆◇◆ O ◆◇◆
        Case "O", "o"
          i = LG + 1
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG + 1
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ P ◆◇◆
        Case "P", "p"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 2
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ Q ◆◇◆
        Case "Q", "q"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 And i <> LG + 2 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓5列目
          LR = LR + 1
          WH13.Cells(LG + 5, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
         
        '◆◇◆ R ◆◇◆
        Case "R", "r"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 3 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
         
         
        '◆◇◆ S ◆◇◆
        Case "S", "s"
          i = LG
          Do Until i > LG + 4
            If i <> LG + 3 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 And i <> LG + 3 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
         
         
        '◆◇◆ T ◆◇◆
        Case "T", "t"
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
         
         
        '◆◇◆ U ◆◇◆
        Case "U", "u"
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ V ◆◇◆
        Case "V", "v"
          i = LG
          Do Until i > LG + 2
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 3, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 3, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 2
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
        '◆◇◆ W ◆◇◆
        Case "W", "w"
          i = LG
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 4, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 3
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
         
         
         '◆◇◆ X ◆◇◆
        Case "X", "x"
          i = LG
          Do Until i > LG + 4
            If i = LG Or i = LG + 4 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          i = LG + 1
          Do Until i > LG + 3
            If i <> LG + 2 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 2, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG + 1
          Do Until i > LG + 3
            If i <> LG + 2 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓5列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i = LG Or i = LG + 4 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
        
        
         '◆◇◆ Y ◆◇◆
        Case "Y", "y"
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG + 2
          Do Until i > LG + 4
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG + 1, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓5列目
          LR = LR + 1  '次の列へ
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
        
        
         '◆◇◆ Z ◆◇◆
        Case "Z", "z"
          i = LG
          Do Until i > LG + 5
            If i <> LG + 1 And i <> LG + 2 And i <> LG + 3 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 5
            If i <> LG + 1 And i <> LG + 2 And i <> LG + 4 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 5
            If i <> LG + 1 And i <> LG + 3 And i <> LG + 4 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓4列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 5
            If i <> LG + 2 And i <> LG + 3 And i <> LG + 4 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
        
        
         '◆◇◆ ! ◆◇◆
        Case "!"
          i = LG
          Do Until i > LG + 4
            If i <> LG + 3 Then
              WH13.Cells(i, LR + 1).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          LR = LR + 1
          
          
         '◆◇◆ ? ◆◇◆
        Case "?"
          WH13.Cells(LG, LR).Interior.ColorIndex = 1
          For h = 1 To 10000
            DoEvents
          Next h
          '----------------------------------------↓2列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 4
            If i <> LG + 1 And i <> LG + 3 Then
              WH13.Cells(i, LR).Interior.ColorIndex = 1
              For h = 1 To 10000
                DoEvents
              Next h
            End If
            i = i + 1
          Loop
          '----------------------------------------↓3列目
          LR = LR + 1  '次の列へ
          i = LG
          Do Until i > LG + 2
            WH13.Cells(i, LR).Interior.ColorIndex = 1
            For h = 1 To 10000
              DoEvents
            Next h
            i = i + 1
          Loop
      End Select

     

    拍手[1回]

    PR

    お名前
    タイトル
    文字色
    URL
    コメント
    パスワード   Vodafone絵文字 i-mode絵文字 Ezweb絵文字
    非公開コメント
    この記事にトラックバックする:
    [484]  [483]  [482]  [481]  [480]  [479]  [478]  [477]  [475]  [474]  [473
    カレンダー
    08 2019/09 10
    S M T W T F S
    1 2 3 4 5 6
    8 9 10 11 12 13 14
    15 16 17 18 19 20 21
    22 23 24 25 26 27 28
    29 30
    ブログ内検索
    最新コメント
    [05/27 きり]
    [01/13 きり]
    [06/06 わんこ]
    [03/30 サイトウ]
    [06/09 yu]
    カウンター
    アクセス解析


    フリーエリア
    コガネモチ


        ◆ graphics by アンの小箱 ◆ designed by Anne ◆

        忍者ブログ [PR]