Private Sub ComboBox1_Change()
Dim i
If ComboBox1.Value <> "" Then
Range("B3:B11").Interior.ColorIndex = 0
Range("B3:B11").Borders(xlEdgeLeft).LineStyle = xlNone
Range("B3:B11").Borders(xlEdgeTop).LineStyle = xlNone
Range("B3:B11").Borders(xlEdgeBottom).LineStyle = xlNone
Range("B3:B11").Borders(xlEdgeRight).LineStyle = xlNone
Range("B3:B11").Borders(xlInsideVertical).LineStyle = xlNone
Range("B3:B11").Borders(xlInsideHorizontal).LineStyle = xlNone
Range("B3:B" & ComboBox1.Value + 2).Select
Selection.Interior.ColorIndex = 6
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.Weight = xlMedium
.ColorIndex = xlAutomatic
End With
With Selection.Borders(xlInsideVertical)
.Weight = xlMedium
End With
Range("B3").Select
End If
End Sub