Function Limit_Only(ByVal x As Integer) As Integer
Select Case x
Case 8, 9, Asc("0") To Asc("9") '允许Tab,BackSpace和数字键
Limit_Only = x
Case Asc("A") To Asc("Z") '允许大写字符
Limit_Only = x
Case Asc("a") To Asc("z") '允许小写字符
Limit_Only = x
Case Else
Dim Value As Long
Value = (CLng(65536) + x) Mod 65536
If (CByte(Value \ 256) And &HA0) And (CByte(Value Mod 256) And &HA0) Then
Limit_Only = x
Else
Limit_Only = 0
End If
End Select
End Function
Function GBBIG5(sStr As String) As String
Dim STR
If CheckBIG(sStr) Then
STR = StrConv(sStr, vbFromUnicode, &H804)
GBBIG5 = StrConv(STR, vbUnicode, &H404)
Else
STR = StrConv(sStr, vbFromUnicode, &H404)
GBBIG5 = StrConv(STR, vbUnicode, &H804)
End If
End Function