简体   繁体   English

保存功能前的EPM / BPC

[英]EPM/BPC BEFORE Save Function

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. 我在SAP BPC 10(EPM 10)中使用了自定义vba函数,我在使用BEFORE Save函数来强制用户在将信息保存到数据库之前成功进行验证检查。

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). 问题是我希望用户选择“ EPM保存工作表”按钮进行一组检查,如果选择“ EPM保存工作簿”按钮则进行另一组检查(第一个仅用于活动工作表,第二个用于所有工作表在工作簿中)。

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

也许您可以使用Application.Caller.Worksheet.Name ,然后检查它是否与您要对其应用逻辑的特定工作表匹配

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM