I was experimenting on adding borders around some named ranges, when I encountered a bit of an oddity
I know that selecting and color filling a named range works, but BorderAround is behaving unexpectedly.
When I process BorderAround, the results are that some border lines of the range area are either missing or the lines are intermittently spaced between cells, resulting in a dashed line that's usually on one or two sides of the named range. I also noticed that if I change the color value, some of the side lines of the borderaround area may have a different colors?
Interestingly enough, this behavior is consistent for each named range processed even after closing and reopening excel.
Private Sub CommandAgrmnt_Click()
Dim Agrmnt As String
Agrmnt = Me.ComboBox.Value
'Range(Agrmnt).Select
Worksheets("Sheet1").Range(Agrmnt).BorderAround _
LineStyle:=xlContinuous, Weight:=xlThick, ColorIndex:=3
'Worksheets("Sheet1").Range(Agrmnt).Interior.ColorIndex = 3
End Sub
Bookmarks