title: why Iam I getting excel VBA's "object required" error when I have supplied an object?
body: <p>My main macro calls 4 sub macros and then executes a single line of code that then generates the "object required" error. I can't figure out why, as I am supplying an object (at least I think I am).</p>
  
  <p>My code looks like this:</p>
  
  <pre><code>Sub main_macro()
      Call Mac1
      Call Mac2
      Call Mac3
      Call Mac4
      Range("B" &amp; input1.Row).Value = Range("C" &amp; scenario1.Row)     &lt;-- this generates the error
  End Sub
  
  Sub Mac1()
     Dim input1 As Range
  End Sub
  
  Sub Mac2()
     Dim scenario1 As Range
  End Sub
  
  Sub Mac3()
     Set input1 = Range("A:A").Find("location1", LookIn:=xlValues, LookAt:=xlWhole)
  End Sub
  
  Sub Mac4()
     Set scenario1 = Range("A:A").Find("location2", LookIn:=xlValues, LookAt:=xlWhole)
  End Sub
  </code></pre>