You are on page 1of 2

ADDITIONAL TOPICS FOR ACTIVITY 1

1. BORDERS:

Range("A4:E20").Select
Selection.Borders(xlDiagonalDown).LineStyle = xlNone
Selection.Borders(xlDiagonalUp).LineStyle = xlNone
With Selection.Borders(xlEdgeLeft)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeTop)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeBottom)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlEdgeRight)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideVertical)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With
With Selection.Borders(xlInsideHorizontal)
.LineStyle = xlContinuous
.ColorIndex = 0
.TintAndShade = 0
.Weight = xlThin
End With

2. COLUMN/ROW WIDTH

Columns("a:a").ColumnWidth = 12

3. ROW HEIGHT

Rows("1:1").RowHeight = 10

4. MERGING CELLS

Range("A4:E4").Select
Selection.MergeCells = True

5. ALIGNMENTS WITHIN A CELL

With Selection
.HorizontalAlignment = xlCenter options (xlLeft, xlRight,xlGeneral)
.VerticalAlignment = xlCenter options (xlUp,xlDown,xlGeneral
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
.MergeCells = True
End With

6. Formatting Adjacent Cells


Range("E6").Select
Selection.AutoFill Destination:=Range("E6:E20"), Type:=xlFillDefault

You might also like