Dim f As String
Dim chkOptn As Boolean
Dim Tile As String
Dim Message As String
Dim Default As String
Default = "3400"
Title = "Enter Hex"
Message = "Range 3400 to 9FBB"
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
Selection.TypeText Text:=ChrW$(CLng("&H" & f))