这是我在新浪博客发表过的一篇学习笔记,在这里也发表一次。
CitectVBA定制过程分析器:删除特定板下面特定的趋势笔_来自金沙江的小鱼_新浪博客 (sina.com.cn)
继续学习练习,如果想要删除板2(从1开始计数)下面的趋势笔2(从1开始计数),使用CitectVBA脚本如下:
Sub deletePanePen() '删除板2下面趋势笔2 Dim pa As Object Dim hPanes As Object Dim hPane As Object Dim hPens As Object Dim hPen 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 Set hPen=Hpens.item(2) hPen.delete End If End If End Sub 标签:Dim,Set,hPanes,Object,分析器,特定,CitectVBA From: https://www.cnblogs.com/fishingsriver/p/16990625.html