User manual

Table Of Contents
Part 2: Automation Programming Reference
Copying Measurements to Excel
The following Excel macro enables the Standard Vertical parameters, then transfers the eight
measurement values into cells C1 to C8. The example is coded in VBA, and would be launched by a button
in a spreadsheet.
' Create Button in Excel
Sub Button1_Click()
' Connect to the oscilloscop
Set app = CreateObject("LeCroy.XStreamDSO")
' Enable Standard Vertical Parameters
app.Measure.MeasureMode = "StdVertical"
' Transfer the 8 parameter values into the spreadsheet
Cells(1, 3).Value = app.Measure.P1.Out.Result.Value
Cells(2, 3).Value = app.Measure.P2.Out.Result.Value
Cells(3, 3).Value = app.Measure.P3.Out.Result.Value
Cells(4, 3).Value = app.Measure.P4.Out.Result.Value
Cells(5, 3).Value = app.Measure.P5.Out.Result.Value
Cells(6, 3).Value = app.Measure.P6.Out.Result.Value
Cells(7, 3).Value = app.Measure.P7.Out.Result.Value
Cells(8, 3).Value = app.Measure.P8.Out.Result.Value
' Clean up
Set app = Nothing
End Sub
2-35