title: VBA - Why does this code need the 'CALL' Statement
body: <p>I have the following code which is doing some collecting of data from webpages.  My questions is why does the code 'work' as I expect with the 'CALL' statement, but doesn't work without it...</p>
  
  <pre><code>    Dim matchURL            As String
      Dim FixtureDetailsTab   As HTMLTable
  
      For Each match In FixtureCollection
          matchURL = match.getMatchURL
      '
      '  Load up the match table
      '
          oXML.Open "GET", matchURL, False
          oXML.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
          oXML.send
  
          Set htmlDoc = New MSHTML.HTMLDocument
          Set htmlBody = htmlDoc.body
          htmlBody.innerHTML = oXML.responseText
      '
      '  And once again look for the elements with class 'engineTable'
      '  (only interested in the first one)
      '
          Set Elements = htmlDoc.getElementsByClassName("engineTable")
          For Each element In Elements
              Set FixtureDetailsTab = element
              Exit For
          Next element
  
          Call match.addDetails(FixtureDetailsTab)
  
      Next match
  </code></pre>
  
  <p>match is a custom class in a separate Class Module, and  'addDetails' is defined as follows</p>
  
  <pre><code>    Public Sub addDetails(detailTab As HTMLTable)
          ....
      End Sub
  </code></pre>
  
  <p>The code above works, but if I remove the call statement and just try and invoke the Sub as below</p>
  
  <pre><code>    match.addDetails (FixtureDetailsTab)
  </code></pre>
  
  <p>I get 'Run time error 13'  - Type mismatch</p>
  
  <p>I'm puzzled.  Any help appreciated.</p>
  
  <p>Thanks</p>