Asc

rosshodges
11-19-2003, 09:58 AM
I making a program to change the ASC value it goes like so:

Private Sub cmdEncode_Click()
Dim str As String
Dim str2 As String
Dim I As Integer
str = txtInput.Text
For I = 1 To Len(str)
str2 = str2 & Asc(Mid(str, I, 1))
str2 = Val(str2) - 1
str2 = Chr(str2)
Next I
txtOutput = str2
End Sub


It take off one value from the ASC value and then displays the char but the only problem is this only works with one char in txtinput as soon as I put in more than one I get an error I no the problem is simple but its been buggin me for hours now!

Thanks
Ross

PlenoJure
11-19-2003, 10:12 AM
See if this (http://visualbasicforum.com/showpost.php?postid=549550&postcount=6) helps any.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum