Dim f As String
Dim chkOptn As Boolean
Dim bArr(0 To 1) As Byte
Dim sMe As String
Dim Tile As String
Dim Message As String
Dim Default As String
Default = "B0A1"
Title = "Enter GBK code"
Message = "Range 8140 to FEA0"
Do While Not chkOptn
f = InputBox(Message, Title, Default)
f = Trim(f)
If f = "" Then Exit Sub
If Len(f) <> 4 Then
MsgBox "Length of Value Entered must be 4."
Else
chkOptn = True
End If
Loop
bArr(0) = CInt("&H" + Mid(f, 1, 2))
bArr(1) = CInt("&H" + Mid(f, 3, 2))
sMe = StrConv(bArr, vbUnicode, &H804)
Selection.TypeText Text:=sMe