1Function GetSOAPObject() As Object 2 Static SOAPObject As Object 3 If SOAPObject Is Nothing Then 4 Set SOAPObject = CreateObject("SOAP.Lite").new 5 If SOAPObject Is Nothing Then 6 MsgBox ("Oops, no SOAP.Lite on this machine") 7 Exit Function 8 End If 9 SOAPObject.proxy("http://localhost/").uri ("http://www.soaplite.com/My/Examples") 10 End If 11 Set GetSOAPObject = SOAPObject 12End Function 13 14Sub GetStateNameRemotely() 15 Application.StatusBar = "Running SOAP call..." 16 Range("Current").FormulaR1C1 = GetSOAPObject.getStateName(Sheet1.TextBox1.Value).result 17 Application.StatusBar = False 18End Sub 19