Hi Experts!
Since this community already could help me in many cases i hope someone can help me with the following issue.
To allow users to set input templates offline and save them to a local drive, i don't want to use the BPC Sheet option "Refresh Data in the Whole File when Opening it". Instead i use the Custom VBA Function "AFTER_WORKBOOK_OPEN". In this function i first check if the workbook is online and afterwards start the BPC refresh API "RefreshActiveWorkBook" using the following code:
Function After_Workbook_Open() ' function starting after opening the excel workbook
' After_Workbook_Open function to verify if workbook is offline
' starts refreshing process if workbook is onlineIf BPCStat Then
epmA.RefreshActiveWorkBook ' EPMExecuteAPI refresh data for the entire workbook
End IfEnd Function
Public Function BPCStat() As Boolean ' public function to check the status of the workbook
' BPCStat defined as boolean:
' True - Online
' False - Offline
On Error GoTo OnlineIf ThisWorkbook.Names.Item("_epmOfflineCondition_") = "=1" Then
BPCStat = False
GoTo ExitF
End If
Online: BPCStat = True
ExitF:End Function
This mainly works perfect, except when using the EPM function EPMSaveData. When opening a workbook the VBA function works and i can see that the workbook is refreshed, but the target cell (yellow cell in the following screenshot) of the EPM function EPMSaveData is not filled with the value shown in the cell with the formula itself:
After entering any cell in this workbook and confirming with Enter values from all EPMSaveData functions will be sent to their target cells.
When using the native "Refresh Data in the Whole File when Opening it" option this issue does not occur.
Has anyone else experienced this problem and how can i avoid this problem?
Thank you for your help,
Florian