E4990A Help
Ana.IO.Close
End Sub
Saving/Recalling a Measurement Result/Measurement Setup
Saving/Recalling a Measurement Result/Measurement Setup
Saving Data Into a File
Capturing Screen Into PC
Transferring Files
Saving Data Into a File
Overview
•
Sample Program in Excel VBA
•
Other topics about Saving/Recalling a Measurement Result
Overview
The program listed in the below section is written in VISA-COM with Excel
VBA. It can be executed from the external PC controller. The program
demonstrates how to save data into a file.
Saving Data Into a File Sample Program in Excel VBA
Private Sub File_Save_Click()
' Declare two string variables for file name and file type
Dim File_Name As String
Dim File_Type As String
Dim ioMgr As VisaComLib.ResourceManager
Dim Ana As VisaComLib.FormattedIO488
'*** The memory area of the resource manager and the instrument I/O are acquired.
Set ioMgr = New VisaComLib.ResourceManager
Set Ana = New VisaComLib.FormattedIO488
'*** Open the instrument.
Set Ana.io = ioMgr.Open("GPIB0::17::INSTR")
Ana.io.timeout = 10000
' Check whether file name textbox is empty or not
If TextBox1.Text <> "" Then
294