RaspiBerry Blog

CnLiutiezhu is here!

VBA更改图表标题方法

| 暂无评论

Sub 辑编标题()
With Worksheets("sheet1").ChartObjects(1).Chart
 .HasTitle = True
 .ChartTitle.Text = "February Sales"
    If .ChartTitle.Text <> "ABC 123" Then
         MsgBox "扣3分"
         .ChartTitle.Text = "ABC 123"
    Else
        MsgBox "加分:5分"
    End If


End With

End Sub

发表回复

*为必填字段!