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