This code changes the ASCII number of a key pressed so that when you type something in a text box,
This code changes the ASCII number of a key pressed so that when you type something in a text box, the letters that appear spell something
API Declarations
no declarations
Rate This code changes the ASCII number of a key pressed so that when you type something in a text box,
(1(1 Vote))
Option Base 1
Private Sub Form_KeyPress(KeyAscii As Integer)
Const strWord As String = "Place Text Here"
Static intIndex As Integer
Static intWord() As Integer
ReDim Preserve intWord(Len(strWord))
If intWord(1) = 0 Then
For intIndex = 1 To Len(strWord)
intWord(intIndex) = Asc(Mid(strWord, intIndex, 1))
Next intIndex
intIndex = 1
End If
If intIndex = 0 Then intIndex = 1
If intIndex = (UBound(intWord()) + 1) Then intIndex = 1
KeyAscii = intWord(intIndex)
intIndex = intIndex + 1
End Sub
Private Sub Form_Load()
Randomize
End Sub
This code changes the ASCII number of a key pressed so that when you type something in a text box, Comments
No comments yet — be the first to post one!
Post a Comment