这是我在新浪博客发表过的一篇学习笔记,在这里也发一次
CitectVBA定制过程分析器4:清空特定板下的趋势笔,但不删除板_来自金沙江的小鱼_新浪博客 (sina.com.cn)
接着学习练习。如果想清空特定板下面的趋势笔,但是不删除这个板,比如针对2#板(从1开始计数),写下面的脚本。
Sub clearPaneAllPen() Dim pa As Object Dim hPanes As Object Dim hPane As Object Dim hPens As Object Dim panecount Set pa=main_AN4 Set hPanes=pa.panes panecount=hPanes.count If panecount>=2 Then Set hPane=hPanes.item(2) Set hPens=hPane.pens If hPens.count >=1 Then hPens.removeall End If End If End Sub 标签:Dim,Object,hPanes,分析器,Set,板下,清空,CitectVBA,hPens From: https://www.cnblogs.com/fishingsriver/p/16990621.html