Вторник, Май 26, 2020

Конструкция With - End With

Sub ChageFont1()
  Selection.Font.Name = "Cambria"
  Selection.Font.Bold = True
  Selection.Font.Italic = True
  Selection.Font.Size = 12
  Selection.Font.Underline = xlUnderlineStyleSingle
  Selection.Font.ThemeColor = xlThemeColorAccent
End Sub


Sub ChageFont2()
  With Selection.Font
    .Name = "Cambria"
    .Bold = True
    .Italic = True
    .Size = 12
    .Underline = xlUnderlineStyleSingle
    .ThemeColor = xlThemeColorAccent1
  End With
End Sub


Back to Top