title: VBA to click HTML Input Radio button
body: <p>i would like a vba code to go to this url "<a href="http://www.anbima.com.br/ima/ima.asp" rel="nofollow noreferrer">http://www.anbima.com.br/ima/ima.asp</a>", then click on the "IRF-M" button, then click on the "Consultar" button.</p>
  
  <p>I've tried this but failed miserably:</p>
  
  <pre><code>'inserir website com os valores a serem buscados
  sitedv01 = "http://www.anbima.com.br/ima/ima.asp"
  
  'busca no site
  Set IE = CreateObject("InternetExplorer.Application")
  
  IE.Visible = True
  
  IE.navigate sitedv01
  
  'espera o carregamento
  Do While IE.Busy
      Application.Wait DateAdd("s", 1, Now)
  Loop
  
  Set tags = IE.document.getElementsByValue("irf-m")
  For Each tagx In tags
      If tagx.src = "http://www.bmf.com.br/bmfbovespa/images/comum/mais.gif" Then
          tagx.Click
      End If
  Next
  </code></pre>