{"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":14,"n_cols":4,"rows_kept":14,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"問題文",null,"解答方法"]
[null,"以下の要件を満たすVBAの\nプログラムを実装して下さい。",null,"解答プログラムは\n「開発」\n→「Visual Basic」\n→「Answer」\n内のSub answer()に記載して下さい。"]
[]
[null,"要件"]
[null,"最初に, シート「読み込み＆書き込みシート」をアクティベートする。"]
[null,"「読み込み＆書き込みシート」の\nセル「今日から何日後」に記載された日数を取得する。"]
[null,"Date関数で今日の日付を取得する。"]
[null,"今日の日付に『セル「今日から何日後」に記載された日数』を加算し, 後日の日付を取得する。"]
[null,"「読み込み＆書き込みシート」のセル「今日」、「後日」に日付を入力する。"]
[null,"最後に, MsgBox関数（情報アイコン）で「日付計算を完了しました！」と表示する。"]

{"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\n    Set ws = ThisWorkbook.Worksheets(\"読み込み＆書き込みシート\")\n    ' シート「読み込み＆書き込みシート」をアクティベートする\n    ws.Activate\n    Dim todayCell As Range: Set todayCell = ws.Cells(6, 2)\n    Dim afterCell As Range: Set afterCell = ws.Cells(12, 2)\n    ' 今日の日付を取得する\n    Dim today As Date: today = Date\n    ' 加算する日数を取得する\n    Dim afterDayNum As Integer: afterDayNum = ws.Cells(9, 3).Value\n    ' 後日の日付を計算, 取得する\n    Dim afterDay As Date: afterDay = DateAdd(\"d\", afterDayNum, today)\n    ' 日付を入力する\n    todayCell.Value = today\n    afterCell.Value = afterDay\n    MsgBox \"日付計算を完了しました！\", vbInformation\nEnd Sub"]
[null,"↑上のプログラムは\n「開発」\n→「Visual Basic」\n→「CorrectAnswerExample」\nに記載してあります。"]

{"sheet":"読み込み＆書き込みシート","index":2,"n_rows":12,"n_cols":3,"rows_kept":12,"cut":false,"hidden":false,"merged":[]}
[]
[]
[]
[]
[null,"今日"]
[null,"2024-09-04"]
[]
[null,null,"今日から何日後"]
[null,null,10]
[]
[null,"後日"]
[null,"2024-09-14"]