Private Sub channel_1_click()
Static nflag As Integer
If (nflag = 0) Then
nflag = 1
End If
If (nflag = 1) Then
ActiveSheet.ChartObjects("图表 1").Activate '图1
ActiveChart.SeriesCollection(1).Select
Selection.Format.Line.Visible = msoTrue '设为显示
nflag = 2
Range("A1").Select
ElseIf (nflag = 2) Then
ActiveSheet.ChartObjects("图表 1").Activate
ActiveChart.SeriesCollection(1).Select
Selection.Format.Line.Visible = msoFalse ' 设为隐藏
nflag = 1
Range("A1").Select
End If
End Sub
vba - 控制excel图表 曲线的隐藏
最新推荐文章于 2025-03-18 09:28:27 发布