278                 Keysight E4980A/AL Precision LCR Meter 
Sample Program
Set Up Measurement Conditions and LCD Display
9-
Example 9-1  Setting measurement conditions and screen display
Sub Example_1()
 
    '===================================
    ' Configuration
    '===================================
 
    Dim defrm As Long             'Session to Default Resource 
Manager
    Dim AgtE4980A/AL As Long            'Session to instrument
 
    On Error GoTo ErrorHandler
 
    '===================================
    ' Open Instrument
    '===================================
 
    ErrorCheck viOpenDefaultRM(defrm)
    Call selectLCR(defrm, AgtE4980A/AL)
 
    '===================================
    ' Setup Start
    '===================================
    Cells(12, 2).Value = "Start to set configuration."
    ErrorCheck viVPrintf(AgtE4980A/AL, "DISP:PAGE MSET" + 
vbLf, 0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "DISP:LINE ""Control 
Example""" + vbLf, 0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "FUNC:IMP ZTD" + vbLf, 
0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "FREQ 1E6" + vbLf, 0)
    ErrorCheck viVPrintf(AgtE4980A/AL, "VOLT 1" + vbLf, 0)