title: Runtime error 424: Object Required
body: <p>I made a huge mistake trying to bullet-proof something and accidentally saved over working code and don't know what I did wrong!</p>
  
  <p>Here's the pertinent code:</p>
  
  <pre><code>Option Base 1
  Dim userRange() as Range
  Dim sheetCount as Integer
  </code></pre>
  
  <p>... (Code to determine "sheetCount" as defined by user here)...</p>
  
  <pre><code>ReDim userRange(sheetCount)
  Dim r As Integer
  For r = 1 To sheetCount
      Sheets(r).Select
      Debug.Print VBA.TypeName(userRange)
      Debug.Print VBA.TypeName(userRange())
      Debug.Print VBA.TypeName(userRange(r))
      Set userRange(r) = Application.InputBox( _
          Prompt:="Select a range to import.", _
          Title:="Select range # " &amp; r, _
          Default:=currentsheet.Range("A1").Address, _
          Type:=8)
  </code></pre>
  
  <p>The line that throws the error is <strong>Set userRange(r)...</strong> Why won't VBA recognize userRange(r) as an object? The Immediate window prints:</p>
  
  <pre><code>Object()
  Object()
  Nothing
  </code></pre>
  
  <p>Please help! Thanks in advance!</p>
  
  <p>JSR</p>