Try to use ChrW function instead.
ChrW takes CharCode as a Unicode code point
Public Shared Function TextFormat(ByVal InputString As String) As String
InputString = InputString.Replace(ChrW(8220), """")
InputString = InputString.Replace(ChrW(8221), """")
TextFormat = InputString
End Function
--
Programmer
"Stimp" wrote:
> I have a function to replace the strange quotes (Chr(8220) and
> Chr(8221)) with standard quotes...
>
> e.g. Public Shared Function TextFormat(ByVal InputString As String) As
> String
>
> InputString = InputString.Replace(Chr(8220), """")
> InputString = InputString.Replace(Chr(8221), """")
>
> TextFormat = InputString
> End Function
>
> usage: TextFormat(objRS("Description"))
>
>
> This compiles fine, but when I run the page I get the following error:
>
> Procedure call or argument is not valid
>
> Line 340: InputString = InputString.Replace(Chr(8220), """")
>
>
>
> Any ideas?
>
> Thanks,
> Peter
>
|