I found way to fix the code using the 'IsNumeric' command. I modified
the code as follows and it's working without the type mismatch error.
(I'll just modify again to use do while loop as suggested by Neville).
Dim val1 As String
val1 = InputBox("Enter any number between 700 to 800")
val2 = IsNumeric(val1)
If val1 = "" Then
MsgBox "No data entered."
ElseIf val2 = False Then
MsgBox "Wrong data"
ElseIf val2 = True Then
If val1 >= 700 And val1 <= 800 Then
MsgBox "OK"
Else
MsgBox "Wrong"
End If
End If