title: Getting attribute values in VBA
body: <p>I need to make a VBA file that will read a webpage and return the value of the SRC attribute of the IMG tag. I wasn't able to make the last step work. Can you guys help me?</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;img src="image.jpg"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>===Edit===
  I managed to return the attribute object. Now I need to return its value</p>
  
  <pre><code>Option Compare Database
  
  Sub AcessaPagina()
      Dim ie As InternetExplorer
      Dim test As String
      Dim obj As Object
  
      Set ie = New InternetExplorer
      ie.Navigate "http://www.google.com.br"
      MsgBox ie.Document.getElementsByTagName("img").Item(0).Attributes("src")
      ie.Visible = True 
  End Sub
  </code></pre>
  
  <p>That's what I have at the moment.</p>