Databases Reference
In-Depth Information
CheckBox1.Visible = True
'Button_Start.Visible = False
Button_End.Visible = True
Button_Terminate.Visible = True
Button_Fit.Visible = True
'Make Origin visible to begin with
ThisWorkbook.ObjOrigin.Execute ("doc -mc 1;")
CheckBox1.Value = True
'Now load a specific template OPJ for performing the computation
and graphing
'Before loading OPJ, give user chance to save current work if
dirty flag is set
If (ThisWorkbook.ObjOrigin.IsModified) Then
'Ask user to go to Origin, save the project, and come back
to Excel
MsgBox ("The project currently open in Origin needs to be
saved" _
& vbNewLine & _
"Go to Origin and save the project if needed." _
& vbNewLine & _
"Click OK button below to continue.")
'Reset the dirty flag
ThisWorkbook.ObjOrigin.IsModified = False
End If
'Load specific template "pKaCurveFitting.opj" OPJ from same
location as this Workbook
Dim strFile As String
strFile = ThisWorkbook.Path + "\pKaCurveFitting.opj"
'Open the Origin project
If Not (ThisWorkbook.ObjOrigin.Load(strFile)) Then
Dim strTemp
strTemp = "Could not open the Origin template project:
" + strFile
MsgBox (strTemp)
End If
'Return Focus to Excel
AppActivate "Microsoft Excel"
Exit Sub
ErrMsg1:
'Could not connect to Origin - report error
MsgBox ("Could not connect to Origin!")
End Sub
Search WWH ::




Custom Search