 <p>The element doesn't necessarily have to have an ID.</p> <p><a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementsbytagname(v=vs.110).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.windows.forms.htmldocument.getelementsbytagname(v=vs.110).aspx</a></p> <p>If that's the case, you should take a look at getting a collection via GetElementsByTagName and looping through - something along these lines:</p> <pre><code>Dim Elems As HtmlElementCollection Elems = WebBrowser1.Document.GetElementsByTagName("input") For Each elem As HtmlElement In Elems Dim nameValue As String = elem.GetAttribute("name") If nameValue.ToLower().Equals("email") Then elem.SetAttribute("value,", ID &amp; "@hotmail.com") End If Next </code></pre>