Attribute VB_Name = "Module2"
Public Sub Highlight(ByRef sText As TextBox)
    With sText
        .SelStart = 0
        .SelLength = Len(sText.Text)
    End With
    End Sub
    Public Function uppercharacter(KeyAscii As Integer) As Integer
Dim var  As Boolean
var = Chr(KeyAscii) Like "[A-Z]"
If var = False And KeyAscii <> 8 Then
KeyAscii = 0
End If
uppercharacter = KeyAscii
End Function
    Public Function number(KeyAscii As Integer) As Integer
Dim stat As String
stat = "0123456789"
If InStr(stat, Chr(KeyAscii)) = 0 And KeyAscii <> 8 Then
KeyAscii = 0
End If
number = KeyAscii
End Function
Public Sub ram()
If mdiform1.Label8.Caption = "Administrator" Then
mdiform1.mnuadmin.Enabled = True
mdiform1.mnuchangepassword.Enabled = True
End If

End Sub

Public Function character(KeyAscii As Integer) As Integer
Dim var  As Boolean
var = Chr(KeyAscii) Like "[a-z A-Z]"
If var = False And KeyAscii <> 8 Then
KeyAscii = 0
End If
character = KeyAscii
End Function
