Sub AddBoxes()
Dim x As Integer
x = InputBox("How many boxes?", "Boxes", 1)
'If you want a vertical Boxes comment the next line and un-comment the line after
Selection.Resize(1, x).Select 'Select Cells to the right of the current cell
'Selection.Resize(x, 1).Select 'Select Cells below the current cell
'Insert Borders
LS = xlContinuous
CS = 0
TAS = 0
Weight = xlThin
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = LS
.ColorIndex = CS
.TintAndShade = TAS
.Weight = Weight
End With
End Sub