title: VBA Sum a Range of Cells
body: <p>I'm attempting to write a simple VBA macro that will take the active cell's column and the user's input to add a range of cells on a single row together. The range is calculated by adding the integer the user inputs to the active column and that is the end column. The problem is it gives me Run-time error '424' and tells me "Object required". When I run it, and gets angry at the sum line.</p>
  
  <p>Here is my code. I'm just starting in VBA so it can't be that hard....right?</p>
  
  <pre><code>Sub Food()
  Dim first As Variant
  Dim last As Integer
  Dim days As Integer
  Dim month As Variant
  Dim total As Double
  first = ActiveCell.Column
  days = InputBox("Days in the month?")
  last = first + days
  month = Range(Cells(first, 4), Cells(last, 4))
  total = Excel.WorksheetFunction.Sum(Report.Range(month))
  Worksheets(1).Cells(1, 13).Value = total
  End Sub
  </code></pre>