Einführung "VBA mit Microsoft Office"

Code Snippet "VBA Excel"

Beispiel für aufgezeichneten Makro, der Titel formatiert

Sub Bsp_Titel_formatieren()
    Selection.Font.Bold = True
    With Selection.Font
        .Name = "Times New Roman"
        .Size = 16
    End With
    With Selection
        .HorizontalAlignment = xlCenterAcrossSelection
    End With
    Selection.BorderAround Weight:=xlMedium, ColorIndex:=xlAutomatic
    With Selection.Interior
        .ColorIndex = 6
    End With
    Selection.Font.ColorIndex = 49
    Selection.RowHeight = 30
End Sub