loadSavedScriptFile("filename", [TRUE][FALSE])


The loadSavedScript file acts as VBA available API to the Read OLAP Script FinanceHub functionality.


The API expects a valid directory and file string argument to be passed.  The contents of the file are immediately executed when selection of the file is complete.


loadSavedScript returns the directory path and filename of the file being opened.  If the file the calling application is attempting to open does not exist or can not opened due to other considerations (permissions etc.) the output from the loadSavedScriptFile function will be: "ERR: No File specified"


The second boolean argument determines if a .moo.out file recording OLAP IO is produced in the same directory as the source file.


Notes


All text files should be saved with a ".moo" file extension.


An example of the loadSavedScript function is seen in the 2012-myObjectiveOLAP-FastExample example Excel workbook.


Syntax


               loadSavedScriptFile("filename", [TRUE][FALSE])


Return Value


               STRING


Example


Private Sub openSavedBTN_Click()


On Error GoTo EH


Set moo = Application.COMAddIns.Item("myObjectiveOLAPXL.AddinModule").Object


debug.print moo.loadSavedScript("c:\myfile.moo", TRUE)


Exit Sub


EH:

 MsgBox Err & ": " & Error(Err)

End Sub