I am trying to autofill a named range obtained from an inputbox with certain values. This is the code that I have but I keep getting Error 13 on my Set fillRange = xRgl line of code. This is the code that I have:
Dim xRg1 As Range
Set xRg1 = Application.InputBox("Range:", Type:=8)
Range("D5").Select
ActiveCell.FormulaR1C1 = "2"
Range("D6").Select
ActiveCell.FormulaR1C1 = "3"
Range("D7").Select
ActiveCell.FormulaR1C1 = "4"
Range("D8").Select
ActiveCell.FormulaR1C1 = "5"
Range("D9").Select
ActiveCell.FormulaR1C1 = "6"
Set SourceRange = Range("D5:D9")
Set fillRange = xRgl
SourceRange.AutoFill Destination:=fillRange