```
    Public myHTTP As MSXML2.XMLHTTP60
    Sub SendXML()
    Dim response As String 
    Dim MyXmlHttpHandler As CXMLHTTPHandler 
    Dim myxml As String 
    Dim a As String
    Dim URL2 As String 
    Dim FSO As Object
    Dim NewFile As Object
    Dim XMLFileText As String

    If Not myHTTP Is Nothing Then Set myHTTP = Nothing

    Set myHTTP = New MSXML2.XMLHTTP60
    Set MyXmlHttpHandler = New CXMLHTTPHandler
    MyXmlHttpHandler.Initialize myHTTP
    myHTTP.OnReadyStateChange = MyXmlHttpHandler
    myxml = "D:\1.xml"
    myHTTP.Open "get", myxml, True
    myHTTP.send (myxml)
    a = myHTTP.responseText
    URL2=Workbooks("MainSheet.xlsm").Worksheets("OTHERS").Range("I2").Value
    If Workbooks("MainSheet.xlsm").Worksheets("OTHERS").Range("h2").Value = vbNullString Or Workbooks("MainSheet.xlsm").Worksheets("OTHERS").Range("h3").Value = vbNullString Then
    MsgBox "User not defined server database address or port number...!!!" & vbNewLine & " Failed.."
    Exit Sub
    End If

    myHTTP.Open "POST", URL2, True
    myHTTP.send (a)

    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set NewFile = FSO.CreateTextFile("D:\response.XML", 1, 1)
    XMLFileText = ""
    NewFile.write (XMLFileText & myHTTP.responseText & vbNewLine)  ‘---------error occurred here not printing my response.text in new file.

    End Sub

```

I have already tried on error resume next, it just printing a blank file.

I have also tried on error goto errorhandler
but it also failed saying runtime error dialoge box....

I just want to save response text in a xml file without any error dialouge box..