I'm using a custom vba function with SAP BPC 10 (EPM 10), I'm using the BEFORE Save function to force the user to succeed in validation checks before information is saved into the database.
The problem is I want the user to go through one set of checks if they select the EPM Save Worksheet button and a different set of checks if they select the EPM Save Workbook button (the first just for the active sheet, the second for all sheets in the workbook).
Any ideas?
This is the code I am using, but I need it to be more dynamic to pick up if the user is simply saving data in the worksheet or for the entire workbook.
Let me know, thanks!
Function BEFORE_SAVE()
If Range("rng_Validation") = 0 Then
MsgBox "Please correct the numbers before saving", vbCritical
BEFORE_SAVE = False
Else
BEFORE_SAVE = True
End If
End Function
Maybe you can use
Application.Caller.Worksheet.Nameand then check if this matches the specific worksheet that you want to apply the logic to