Table of Contents

Example

' sets the border line style for cells A1:J10
With Worksheets(1)
    .Range(.Cells(1, 1), _
        .Cells(10, 10)).Borders.LineStyle = xlThick
End With

the period in front of each occurrence of the Cells property is required if the result of the preceding With statement is to be applied to the Cells property — in this case, to indicate that the cells are on worksheet one (without the period, the Cells property would return cells on the active sheet