Private Sub Command1_Click()
Dim obj As MSXML2.ServerXMLHTTP
Dim objLerXml As MSXML2.DOMDocument
Set obj = New MSXML2.ServerXMLHTTP
Set objLerXml = New MSXML2.DOMDocument
'query_string
url = "http://republicavirtual.com.br/web_cep.php?cep=" & txtCEP & "&formato=XML"
obj.open "GET", url
obj.send
'se ocorreu um erro HTTP
If obj.Status >= 400 And obj.Status <= 505 Then
MsgBox "Erro Ocorrido : " & obj.Status & " - " & obj.statusText
Exit Sub
Else
Set nobj = obj.responseXML.documentElement.childNodes
vContador = nobj.length
For vI = 0 To vContador - 1
MsgBox nobj(vI).nodeName + " - " + nobj(vI).Text
Next
End If
End Sub