Hi,

I am entering xml parameter
( '<MnOBI>
<Geo country_name="India"> </Geo>
</MnOBI>'

)
in B2 cell but I getting (run time error 1004: Application-defined or Object-defined error ) and when I select debug it is redirecting to "ActiveWorkbook.Connections(“Connection1″).Refresh" line in VBA code.

but when I enter a normal parameter the code is working fine.
Someone Plz.. help me to rectify this error.

VBA Code:

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Intersect(Target, Range(“B2″)) Is Nothing Then

‘ Nothing

Else

ActiveWorkbook.Connections(“Connection1″).OLEDBConnection.CommandText = “Exec [testxmlpara] ‘” & Range(“B2″).Value & “‘”

ActiveWorkbook.Connections(“Connection1″).Refresh

MsgBox (“ConMod: ” & ActiveWorkbook.Connections(“Connection1″).OLEDBConnection.CommandText)

End If
End Sub