2
I was able to convert all the text that the user wrote on TextBox to ASCII, but not the other way around. How can I make this conversion from ASCII to text?
Private Sub BtnConvert_Click(sender As Object, e As EventArgs) Handles BtnConvert.Click
    ConvertedTXT.Clear()
    If TxtAscii.Checked = True Then
        While TheLength <> WaitingTXT.Text.Length
            ConvertedTXT.Text += (AscW(WaitingTXT.Text(TheLength)) & " ")
            TheLength += 1
        End While
        TheLength = 0
    ElseIf AsciiTxt.Checked = True Then
        ConvertedTXT.Text += (ChrW(WaitingTXT.Text(TheLength)) & " ")
    End If
End Sub
The code shows the error below:
| Code | Description | Project | Filing cabinet | 
|---|---|---|---|
| BC32006 | "Char" values cannot be converted to "Integer". Use "Microsoft.VisualBasic.Ascw" to interpret a character as a Unicode value or "Microsoft.VisualBasic.Val" to interpret it as a digit. | Ascii Converter | Form1.Vb | 
Note: I declared the variable TheLength as Double initialized in 0.