Using OneStream Excel VBA functions
Do the OneStream Excel VBA functions return a value that can be used to determine success or failure? For example, I am loading data to a cube using a sheet with a number of XFSetCell() formulas and then using the VBA function RefreshXFFunctionsForActiveWorksheet() in a module to load this data:
Call ExecuteXFFunction("RefreshActiveSheetXF")
........
Public Sub ExecuteXFFunction(XFFunction As String)
' This executes whatever XF functions are defined on the active worksheet. The active worksheet needs to be set before calling this function
Set xfAddIn = Application.COMAddIns("OneStreamExcelAddIn")
If Not xfAddIn Is Nothing And Not xfAddIn.Object Is Nothing Then
Select Case XFFunction
Case "RefreshActiveSheetXF"
Call xfAddIn.Object.RefreshXFFunctionsForActiveWorksheet
Case "RefreshActiveSheetQV"
Call xfAddIn.Object.RefreshQuickViewsForActiveWorksheet
End Select
End If
End Sub
What I want to do is to check to see if the xfAddIn.Object.RefreshXFFunctionsForActiveWorksheet has been successful, so want to check a return value. Typically I would do something like
rtn = functionName
and then check the value in rtn but need to use Call with the xfAddIn functions, so is there a way to check the success/failure?