Problem with ASC and MID function in ASP/VbScript?

  • Thread starter Thread starter ForgottenSpectrum
  • Start date Start date
F

ForgottenSpectrum

Guest
Don't know why I keep getting the error "Invalid procedure call or argument: 'Asc'" for this function. Please help.

Public Function encrypts(ByVal mystring)
Dim temp
Dim tempascii
Dim tempstring

Dim x
For x = 1 To 5000
temp = Mid(mystring, x, 1)
tempascii = Asc(temp)
tempascii = tempascii + 5
tempstring = tempstring & Chr(tempascii)
Next

encrypts = tempstring
End Function
 
Back
Top