{"text_format":"1","workbook":"xlsx","n_sheets":3,"sheets":["問題文＆解答","正答","書き込みシート"],"not_rendered":{"charts":0,"images":1,"macros":1,"external_links":0,"defined_names":0,"comments":0,"pivot_tables":0},"unopened":[],"bounds":{"document_bytes":16777216,"sheet_cells":100000,"rows_first":2000,"rows_last":500,"rows_between":2000,"halvings":0,"cell_chars":16384,"cell_head_chars":4096},"cells_cut":0,"cells_raw":0,"read":"whole","date_system":"1900"}

{"sheet":"問題文＆解答","index":0,"n_rows":13,"n_cols":4,"rows_kept":13,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"問題文",null,"解答方法"]
[null,"以下の要件を満たすVBAの\nプログラムを実装して下さい。",null,"解答プログラムは\n「開発」\n→「Visual Basic」\n→「Answer」\n内のSub answer()に記載して下さい。"]
[]
[null,"要件"]
[null,"最初に, シート「書き込みシート」をアクティベートする。"]
[null,"Dim arr(1,2) As Integerで2×3の整数型の配列を作る。\n（配列の最小インデックスは指定しなければ, 0になる。）"]
[null,"LBound, UBoundを用いて, 配列arrをループし, \n作成した配列の各要素に0~5を代入する。"]
[null,"LBound, UBoundを用いて, 配列arrをループし,  \n配列の要素をシート「書き込みシート」内のセル「arr」に入力する。"]
[null,"最後に, MsgBox関数（情報アイコン）で\n「arrの要素記入を完了しました。」と表示する。"]

{"sheet":"正答","index":1,"n_rows":7,"n_cols":2,"rows_kept":7,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"正答プログラム例"]
[null,"Option Explicit\n\nSub correctAnswerExample()\n    Dim ws As Worksheet: Set ws = ThisWorkbook.Worksheets(\"書き込みシート\")\n    ' 2×3の整数型の配列を作成(最小インデックスは0)\n    Dim arr(1, 2) As Integer\n    Dim i As Integer\n    Dim j As Integer\n    Dim val As Integer\n    Dim arrRng As Range: Set arrRng = ws.Range(ws.Cells(6, 2), ws.Cells(7, 4))\n    ' シート「書き込みシート」をアクティベート\n    ws.Activate\n    ' 配列の各要素に0～5を代入\n    For i = LBound(arr, 1) To UBound(arr, 1)\n        For j = LBound(arr, 2) To UBound(arr, 2)\n            arr(i, j) = val\n            val = val + 1\n        Next j\n    Next i\n    ' 配列の要素をシート「書き込みシート」内のセルに入力\n    ' 複数セルが代入されたRange変数の最小インデックスは1であることに注意する\n    For i = LBound(arr, 1) To UBound(arr, 1)\n        For j = LBound(arr, 2) To UBound(arr, 2)\n            arrRng(i + 1, j + 1).value = arr(i, j)\n        Next j\n    Next i\n    ' メッセージボックスで完了を通知\n    MsgBox \"arrの要素記入を完了しました。\", vbInformation\nEnd Sub"]
[null,"↑上のプログラムは\n「開発」\n→「Visual Basic」\n→「CorrectAnswerExample」\nに記載してあります。"]

{"sheet":"書き込みシート","index":2,"n_rows":7,"n_cols":4,"rows_kept":7,"cut":false,"hidden":false,"merged":[[4,1,4,3]]}
[]
[]
[]
[]
[null,"arr"]
[null,0,1,2]
[null,3,4,5]