Sub TestAgilent34405()
'DMM 对象 Dim myDmm AsNew Agilent34405 Dim resourceDesc As String Dim initOptions As String Dim idquery As Boolean Dim reset As Boolean
'中间过程变量
Dim msgStr As String
Dim errorCode As Long
Dim errorMsg As String
Dim myStr As String
Dim data As Double
'数据保存变量
Dim tstSht As Worksheet
Dim curRow As Integer
On Error GoTo ErrHandler
errorCode = -1
'*****************************************************************************************
'每次运行时,删除已有的同名的数据表,然后再重新创建一个新的记录表
'******************************************************************************************
For Each tstSht In ActiveWorkbook.Sheets
If tstSht.Name = "DMM_Agilent_34405A 操作演示" Then
tstSht.Delete
Exit For
End If
Next