Add Reference in Excel
Note
To add the Bode 100 reference in your Excel project be sure that you Enabled Macros in Excel
Open the Visual Basic (for applications) Editor and navigate through the following pages:
Open reference dialogue
Select the Bode Automation Interface Reference
Click OK.
After successfully adding the reference execute following code to gain access to the device.
Sub Init()
Dim ai As BodeAutomation
Set ai = New BodeAutomation
Dim bode As Bode100
Set bode = ai.Connect()
Dim meas As S21Measurement
Set meas = bode.Transmission.CreateS21Measurement()
meas.ConfigureSweep 10, 40000000, 201, SweepMode_Logarithmic
meas.ReceiverBandwidth = ReceiverBandwidth_kHz1
State = meas.ExecuteMeasurement
MsgBox "Status: " & State & " Count: " & meas.Results.Count
bode.ShutDown
End Sub