I use this code to enter the date into a webpage search.
My value (xxx) appears on the webpage in the correct inputbox. ( When I step through the code I can actually see the value in the right place)
The second input is a button that is supposed to execute the search based on xxx.
However, on the click command the webpage refreshes but not does search based on my value, it simply refreshes to the default (today) and the inputbox is cleared of my search value.
Any ideas on how I can make this work?

Set ElementCol = oIE.document.getElementsByTagName("input")
For Each element In ElementCol
    If element.ID = "ctl00_ctl00_mainContent_cmscontent_ProgramCourse_dtpDate_dateInput" Then
        xxx = "01/07/2015"
        element.setAttribute "value", xxx
        Set ElementColx = oIE.document.getElementsByTagName("input")
        For Each elementx In ElementColx
            If elementx.ID = "ctl00_ctl00_mainContent_cmscontent_ProgramCourse_btnFilter_input" Then elementx.Click
            Do While oIE.Busy Or oIE.readyState <> 4: DoEvents: Loop
        Next elementx
    End If
Next element

On a related note:
This code is supposed to change how many values are shown to 100 (default is 20).
Again, the input box value is changed to my value (100, which again I can actually see the value changed to 100 in the input) but does not alter how many values are shown, it still only shows the default number.
The other option is a changing the value of a dropdown list which consists of 20,50 and 100.
The fireevent does not appear to do anything.


Set ElementCol = oIE.document.getElementsByTagName("input")
For Each element In ElementCol
    If element.ID = "ctl00_ctl00_mainContent_cmscontent_ProgramCourse_lvProgramCourse_ctl00_ctl03_ctl01_PageSizeComboBox_Input" Then
         'element.selectedIndex = "2"
         element.setAttribute "value", "100"
         'Application.Wait Now + TimeValue("00:00:10")
        element.FireEvent ("onChange")
    End If
Next element

Any assistance would be much appreciated.