Teledyne LeCroy SAS_SATA Tracer_Trainer Automation API Manual User Manual

Page 88

Advertising
background image

LeCroy Corporation

Automation API for SAS/SATATracer/Trainer

Manual Version 1.11

88


VBA (MS Excel):

Public WithEvents VSEEvents As VScriptEngine

. . .

Private Sub VSEEvents_OnNotifyClient( ByVal eventId As Long,

ByVal eventBody As Variant,
ByVal Tag As Long )

Dim Col As Integer
Dim Item As Variant

ThisWorkbook.Sheets("Sheet1").Cells(LineIndex, 1) = eventId

If IsArray(eventBody) Then
Col = 3

For Each Item In eventBody
ThisWorkbook.Sheets("Sheet1").Cells(LineIndex, Col) = Item
Col = Col + 1
Next

Else
ThisWorkbook.Sheets("Sheet1").Cells(LineIndex, 2) = eventBody

End If

LineIndex = LineIndex + 1


End Sub


Advertising