Використання елементів управління в книгах і листах Microsoft Excel
Selection.Font.Bold = True
With Selection
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlBottom
.WrapText = False
.Orientation = 0
.AddIndent = False
.IndentLevel = 0
.ShrinkToFit = False
.ReadingOrder = xlContext
End With
Range("A5").Select
ActiveCell.FormulaR1C1 = "ФН"
Range("A6").Select
ActiveCell.FormulaR1C1 = "МХВ"
Range("A7").Select
ActiveCell.FormulaR1C1 = "УТР"
Range("A8").Select
ActiveCell.FormulaR1C1 = "ЕК"
Range("A9").Select
ActiveCell.FormulaR1C1 = "Всього"
Range("B9").Select
ActiveCell.FormulaR1C1 = "=SUM(R[-4]C:R[-1]C)"
Range("B9").Select
Selection.AutoFill Destination:=Range("B9:E9"), Type:=xlFillDefault