Microsoft Office Tutorials and References
In Depth Information
Using the Borders property for formatting the borders of your cells is fairly straightforward,
but if you want to add a single border around a range of cells, you can use the Range object’s
BorderAround method to draw an outline around the range. The BorderAround method has
the following syntax:
BorderAround( LineStyle , Weight , ColorIndex , Color )
The arguments LineStyle , We fight , ColorIndex , and Color all serve the purposes listed in Table
10-8, but you need to call them as parameters. For example, if you wanted to draw a thin,
dashed, red border around the range B1:E1, you would do so using the following procedure:
Sub RedBorder()
Range(“B1:E1”).BorderAround LineStyle := xlDash, Weight := xlThin, _
Color := vbRed
End Sub
In this chapter, you’ve learned how Excel manages colors, how to display the colors in the
Excel color palette, and how to change those colors to meet your formatting needs. You’ve
also been introduced to available formatting properties that let you make your headings
stand out and your data easier to read and even highlight worksheets that have been changed
since the last time they were saved.
Search JabSto ::

Custom Search