How to use substring in vbscript within a xsl page.

Posted by dipesh on Stack Overflow See other posts from Stack Overflow or by dipesh
Published on 2010-06-18T10:10:38Z Indexed on 2010/06/18 10:23 UTC
Read the original article Hit count: 168

Filed under:

I am trying to replace the double quotes in a string with a single quote, got the following code but get error message saying "Object Required strLocation"

Sub UpdateAdvancedDecisions(strLocation)

Dim d
Dim strLLength

strLLength = Len(strLocation) - 1

For d = 0 To strLLength

alert strLocation

strValue = strLocation.Substring(2,3)

If strLocation.substring(d,d+1)=" " " Then 

strLLength = strLLength.substring(0, d) + "'" + strLLength.substring(d + 1,strLLength.length)


Next
End Sub

© Stack Overflow or respective owner

Related posts about vbscript