标题: excel自动将后两位数加粗并设为黑体 [打印本页]

作者: xiongda    时间: 2015-5-27 01:11
标题: excel自动将后两位数加粗并设为黑体
自动将后两位数加粗并设为黑体(QZ原创,记录用)


代码如下:
Sub Qz1()   
    With ActiveCell.Characters(Start:=1, Length:=11).Font
        .Name = "宋体"
        .FontStyle = "常规"
        .Size = 20
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
    With ActiveCell.Characters(Start:=12, Length:=2).Font
        .Name = "黑体"
        .FontStyle = "加粗"
        .Size = 20
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleNone
        .ColorIndex = xlAutomatic
    End With
End Sub






欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1