| 
    
     |  | Dim Stm As Integer, Enm As Integer Dim Dy1 As Long, Dy2 As Long
 Dim Get1 As Variant, Get2 As Variant
 Dim PltR As Range
 
 With Application
 Do
 Stm = .InputBox("プロットを開始する月を1〜12の数値で入力", _
 Type:=1)
 If Stm = False Then Exit Sub
 Loop While Stm < 1 Or Stm > 12
 Do
 Enm = .InputBox("プロットを終了する月を1〜12の数値で入力", _
 Type:=1)
 If Enm = False Then Exit Sub
 Loop While Enm < 1 Or Enm > 12
 Dy1 = CLng(DateSerial(Year(Date), Stm, 1))
 Dy2 = CLng(DateSerial(Year(Date), Enm, 1))
 Get1 = .Match(Dy1, Range("A:A"), 0)
 Get2 = .Match(Dy2, Range("A:A"), 0)
 End With
 If Not IsError(Get1) And Not IsError(Get2) Then
 Set PltR = Range(Cells(Get1, 1), Cells(Get2, 4))
 ActiveSheet.ChartObjects(1).Chart.SetSourceData PltR
 Set PltR = Nothing
 Else
 MsgBox "該当する日付が見つかりません", 48
 End If
 
 A列の項目が日付型であれば、1月1日〜12月1日まであるとして、こんな感じのコード
 にすれば良いと思います。
 
 |  |