There are a LOT of variables to account for (and sometimes ones that actually can't be accounted for and can't be done) when it comes to using VBA to manipulate webpages. I have heard great things about Selenium, if you're interested.
In the meantime, check out this sample. In this case I have a reference checked as pictured. The form will search Google for the text put into the textbox. In this case, success depended heavily on me being able to View Source (html) of the Google webpage and see a clearly labeled/named/ID'ed Element. Not every webpage will make that available I don't think, but this example might get you started. Note also that I used Forms(0) in my code--but that may not be proper for another website that has multiple areas to input/submit within the same page.
In this case one of the articles I referenced was
this one, which seems to be one of the most comprehensive little collections of information about your subject - I especially appreciated the advice in this article on getting Intellisense where otherwise I wasn't getting any.