In Excel there are many ways you can draw a line and
give in the worth of thickness. But i want to know how
i can do the same with the borders around a cell.
In example... i give my cell a border with the thickness
of 0.25 pt.
As far as I can see, there is no way to do that. If you
look at the possibilities in the Visual Basic Editor,
there are only four possible values.
Sub TestBorder()
Range("B8").BorderAround Weight:=xlHairline 'or =1
Range("B10").BorderAround Weight:=xlThin 'or =2
Range("B12").BorderAround Weight:=xlMedium 'or =3 or -4138
Range("B14").BorderAround Weight:=xlThick '=4
End Sub
One possible Workaround would be to draw a rectangle
around the selected cells :
Sub DrawRectangle()
With Selection
MyLeft = .Left
MyTop = .Top
MyWidth = .Width
MyHeight = .Height
End With
ActiveSheet.Shapes.AddShape(msoShapeRectangle, _
MyLeft, MyTop, MyWidth, MyHeight).Select
With Selection.ShapeRange
.Fill.Visible = msoFalse
.Line.Weight = 0.25
End With
End Sub
Well this is what I could suggest. But there might be
other (better) ways...