標題: excel自動將后兩位數(shù)加粗并設(shè)為黑體 [打印本頁]

作者: xiongda    時間: 2015-5-27 01:11
標題: excel自動將后兩位數(shù)加粗并設(shè)為黑體
自動將后兩位數(shù)加粗并設(shè)為黑體(QZ原創(chuàng),記錄用)


代碼如下:
Sub Qz1()   
    With ActiveCell.Characters(Start:=1, Length:=11).Font
        .Name = "宋體"
        .FontStyle = "常規(guī)"
        .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.torrancerestoration.com/bbs/) Powered by Discuz! X3.1