There's no need to populate the text box and submit that page. Instead, you can specify the zip code directly in the results page URL, e.g. http://oaspub.epa.gov/powpro/ept_pac...ty?p_zip=32542
Therefore:
Option Explicit
Dim XMLhttp As Object
Sub Get_Zipcode_Data()
Dim cell As Range
For Each cell In Range("A1:A107")
Get_Electricity_Companies cell.Value, cell.Offset(0, 1)
DoEvents
Next
Set XMLhttp = Nothing
End Sub
Private Sub Get_Electricity_Companies(zipcode As String, destinationCell As Range)
Dim URL As String
Dim HTMLdoc As Object
Dim SelectCompany As Object
Dim i As Integer
URL = "http://oaspub.epa.gov/powpro/ept_pack.utility"
If XMLhttp Is Nothing Then
Set XMLhttp = CreateObject("Microsoft.XMLHTTP")
End If
Set HTMLdoc = CreateObject("HTMLFile")
With XMLhttp
.Open "GET", URL & "?p_zip=" & zipcode, False
.send
'Load response into a HTMLdocument object
HTMLdoc.body.innerHTML = .responseText
End With
'Get the Select element and loop through its option text
Set SelectCompany = HTMLdoc.all.Item("p_egcid")
If Not SelectCompany Is Nothing Then
For i = 0 To SelectCompany.Length - 1
destinationCell.Offset(0, i).Value = SelectCompany(i).innerText
Next
End If
End Sub