Function GetHTMLCode(Optional strURL As String) As String Dim objHttp As Object, strText As String Set objHttp = CreateObject("MSXML2.ServerXMLHTTP") objHttp.Open "GET", strURL, False objHttp.setRequestHeader "User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)" objHttp.Send ("") strText = objHttp.responseText Set objHttp = Nothing GetHTMLCode = strText End Function