"excel vba set border around range" Code Answer's
You're definitely familiar with the best coding language VBA that developers use to develop their projects and they get all their queries like "excel vba set border around range" answered properly. Developers are finding an appropriate answer about excel vba set border around range related to the VBA coding language. By visiting this online portal developers get answers concerning VBA codes question like excel vba set border around range. Enter your desired code related query in the search bar and get every piece of information about VBA code related question on excel vba set border around range.
excel vba set border around range

'VBA routine to set the border AROUND or THROUGH a range:
Sub SetRangeBorders(r As Range, Optional edges As Boolean = 1, Optional stl = 1, Optional clr = 0, Optional wgt = 2)
Dim e
If edges Then
For Each e In Array(xlEdgeLeft, 8, 9, 10)
SetBorder r.Borders(e), stl, clr, wgt
Next
Else
SetBorder r.Borders, stl, clr, wgt
End If
End Sub
Sub SetBorder(b, Optional stl = 1, Optional clr = 0, Optional wgt = 2)
b.LineStyle = stl
b.Color = clr
b.Weight = wgt
End Sub
'--------------------------------------------------------------------
SetRangeBorders [d2:k10]
SetRangeBorders [d2:k10], False, vbRed
SetRangeBorders [d2:k10], , , xlThick
Source: academy.excelhero.com
All those coders who are working on the VBA based application and are stuck on excel vba set border around range can get a collection of related answers to their query. Programmers need to enter their query on excel vba set border around range related to VBA code and they'll get their ambiguities clear immediately. On our webpage, there are tutorials about excel vba set border around range for the programmers working on VBA code while coding their module. Coders are also allowed to rectify already present answers of excel vba set border around range while working on the VBA language code. Developers can add up suggestions if they deem fit any other answer relating to "excel vba set border around range". Visit this developer's friendly online web community, CodeProZone, and get your queries like excel vba set border around range resolved professionally and stay updated to the latest VBA updates.