VB Code:
'Variable to hold the existing text
Dim strOldText As String
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
'Assign the text in the text box to our variable
'before it gets changed
strOldText = Text1.Text
End Sub
Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
'Check if the old text remains undisturbed
If InStr(1, Text1.Text, strOldText, vbBinaryCompare) <> 1 Then
MsgBox "You have changed the existing text. " & _
"Only additions are permitted", vbInformation, "Go Back"
'If the old text is disturbed, revert back to the old text
Text1.Text = strOldText
End If
End Sub
Private Sub Command1_Click()
'Do something with the new text
MsgBox StrReverse(Text1.Text)
End Sub