Function QuantityDiscount(quantity) 'For the sake of the example, just return a fixed amount QuantityDiscount = 10 End Function Function ErrorXML() Dim sXML sXML = "Invalid numbers" ErrorXML = sXML End Function Function SuccessXML(sDiscount, sExtprice) Dim sXML sXML = "" & vbNewLine sXML = sXML & " " & sDiscount & "" & vbNewLine sXML = sXML & " " & sExtprice & "" & vbNewLine sXML = sXML & "" SuccessXML = sXML End Function