title: Excel: Visual Basic: range as function input doesn't work
body: <p>I'm starting with VB in Excel; so far I can't figure the following;
  I've got the following function:</p>
  
  <pre><code>Function testGetRange(myRange As Range)
      Dim weekStart As Integer
      Dim weekEnd As Integer
  
      weekStart = myRange(1).Value
      weekEnd = myRange(2).Value
  End Function
  </code></pre>
  
  <p>If I try to execute it like that:</p>
  
  <pre><code>Sub CreationRapport()
      Dim testRange1 As Range
      Set testRange1 = Range("A5:B5")
  
      testGetRange (testRange1)
  End Sub
  </code></pre>
  
  <p>I've got an error like "object needed" (sorry the error message is in French: "objet requis"), stopping right when I try to execute the function.</p>
  
  <p>So: the range is created, the function takes a range as input; don't know why this doesn't work...</p>