Excel VBA: Set the background-color & border for a user-defined range of rows
Quick notes -

The inputbox can restrict the input by the type argument.

You can also just format it as a table and then unlist the table to keep it as a range -

Sub example()
    Dim targetTable As ListObject
    Dim targetRange As Range
    Set targetRange = Application.InputBox("Select Range", Type:=8)
    Set targetTable = ActiveSheet.ListObjects.Add(xlSrcRange, targetRange)
    targetTable.TableStyle = "TableStyleMedium16"
    targetTable.Unlist
End Sub


Now just make your own custom table style and you're good to go.

Also, integers are obsolete. According to msdn VBA silently converts all integers to long.