or

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$3" And Target.Value > 99999 Then
    MsgBox "Numbers may not exceed 99999"
    Application.Goto Reference:=Range("F3"), scroll:=False
End If
End Sub
Kind regards
Leo