title: using getElementByClassName in VBA
body: <p>I am using this code to get product name from a page
  code of page is</p>
  <pre><code>&lt;div class=&quot;product-shop col-sm-7&quot;&gt;
  &lt;div class=&quot;product-name&quot;&gt;
  &lt;h1 &gt;Claro Glass 1.5 L Rectangular Air Tight Food Container with Lid- Clear GMA0215A&lt;/h1&gt;
  &lt;/div&gt;
  </code></pre>
  <p>my vba code is</p>
  <pre><code>Public Sub GetValueFromBrowser()
  Dim ie As Object
  Dim name As String
  Do Until IsEmpty(ActiveCell)
  ActiveCell.Offset(0, 1).Value = &quot;RUNNING&quot;
  URL = Selection.Value
  Set ie = CreateObject(&quot;InternetExplorer.Application&quot;)
  With ie
  .Visible = 0
  .navigate URL
  While .Busy Or .readyState &lt;&gt; 4
  DoEvents
  Wend
  End With
  Dim Doc As HTMLDocument
  Set Doc = ie.document
  ActiveCell.Offset(0, 1).Value = &quot;ERROR&quot;
  name = Trim(Doc.getElementByClassName(&quot;product-name&quot;).innerText)
  ActiveCell.Offset(0, 1).Value = name
  ie.Quit
  Loop
  End Sub
  </code></pre>
  <p>error i am getting is</p>
  <blockquote>
  <p>run-time error '438':</p>
  <p>Object doesn't support this property or method</p>
  </blockquote>