Programming
295
File_Name = Trim(TextBox1.Text)
File_Type = Trim(frmFileSave.ComboBox1.Value)
' Open connection to the Ana
Select Case File_Type
Case "1: State (State Only)"
Ana.writestring ":MMEM:STOR:STYP STAT", True
Ana.writestring ":MMEM:STOR """ & File_Name & ".sta""", True
Case "2: State (State & Cal)"
Ana.writestring ":MMEM:STOR:STYP CST", True
Ana.writestring ":MMEM:STOR """ & File_Name & ".sta""", True
Case "3: State (State & Trace)"
Ana.writestring ":MMEM:STOR:STYP DST", True
Ana.writestring ":MMEM:STOR """ & File_Name & ".sta""", True
Case "4: State (All)"
Ana.writestring ":MMEM:STOR:STYP CDST", True
Ana.writestring ":MMEM:STOR """ & File_Name & ".sta""", True
Case "5: Trace Data (CSV)"
Ana.writestring ":MMEM:STOR:FDAT """ & File_Name & ".csv""", True
Case "6: Screen Image (BMP)"
Ana.writestring ":MMEM:STOR:IMAG """ & File_Name & ".bmp""", True
Case Else
MsgBox "Error in code"
End Select
Ana.io.Close
Else
MsgBox "Please enter a filename"
End If
End Sub
Private Sub UserForm_Initialize()
ComboBox1.AddItem "1: State (State Only)"
ComboBox1.AddItem "2: State (State & Cal)"
ComboBox1.AddItem "3: State (State & Trace)"
ComboBox1.AddItem "4: State (All)"
ComboBox1.AddItem "5: Trace Data (CSV)"
ComboBox1.AddItem "6: Screen Image (BMP)"