Private Sub Text0_BeforeUpdate(Cancel As Integer)
Dim i As Integer
For i = 1 To Len(Text0.Text)
If Asc(UCase(Mid(Text0.Text, i, 1))) < 65 Or Asc(UCase(Mid(Text0.Text, i, 1))) > 90 Then
MsgBox "only alpha characters allowed"
Cancel = True
Exit Sub
End If
Next i
End Sub