{"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":10,"n_cols":4,"rows_kept":10,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"問題文",null,"解答方法"]
[null,"以下の要件を満たすVBAの\nプログラムを実装して下さい。",null,"解答プログラムは\n「開発」\n→「Visual Basic」\n→「Answer」\n内のSub answer()に記載して下さい。"]
[]
[null,"要件"]
[null,"シート「読み込み＆書き込みシート」の「collectionテーブル」を読み込み, \nプログラム上のコレクション変数にすべての「キー」, 「値」を追加していく。\n次に, 「キー（手動選択）」を読み込み, \nそのキーでコレクション変数から値を取得し, \nその値を「値（プログラムで入力）」に記入する。"]
[null,"最後に, シート「読み込み＆書き込みシート」をアクティベートにして, \nMsgBox関数で「実行完了」と表示する。"]

{"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 readWriteSht As Worksheet: Set readWriteSht = ThisWorkbook.Worksheets(\"読み込み＆書き込みシート\")\n    Dim colTbl As ListObject: Set colTbl = readWriteSht.ListObjects(\"collectionテーブル\")\n    Dim colData As New Collection\n    Dim selectedKey As String: selectedKey = readWriteSht.Cells(6, 5).Value\n    Dim loopLow As ListRow\n    ' テーブルから「キー」, 「値」をコレクションに追加していく(For Each文でループ)\n    For Each loopLow In colTbl.ListRows\n        colData.Add Item:=loopLow.Range.Cells(1, 2).Value, Key:=loopLow.Range.Cells(1, 1).Value\n    Next\n    readWriteSht.Cells(9, 5).Value = colData(selectedKey)\n    ' シート「読み込み＆書き込みシート」をアクティベートにする\n    readWriteSht.Activate\n    ' MsgBox関数で「実行完了」と表示\n    MsgBox (\"実行完了\")\nEnd Sub"]
[null,"↑上のプログラムは\n「開発」\n→「Visual Basic」\n→「CorrectAnswerExample」\nに記載してあります。"]

{"sheet":"読み込み＆書き込みシート","index":2,"n_rows":10,"n_cols":5,"rows_kept":10,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[null,"collectionテーブル"]
[null,"キー","値",null,"キー（手動選択）"]
[null,"a","りんご",null,"a"]
[null,"b","ゴリラ"]
[null,"c","ラッコ",null,"値（プログラムで入力）"]
[null,"d","こま"]
[null,"e","マット"]