Excel_VBA 设置单元格的字体属性(字体、字号、加粗、斜体、颜色等)
Public Sub 4_144()
Dim myRange As Range
Dim myFont As Font
Set myRange = Range("A1") '指定任意的单元格区域
Set myFont = myRange.Font
Cells.Clear '清除工作表数据
myRange.Value = "ExcelVBA实用技巧大全"
With myFont
.Name = "华文新魏"
.Size = 15
.Bold = True
.Italic = True
.ColorIndex = 3
End With
Set myFont = Nothing
Set myRange = Nothing
End Sub