on 2017 Jan 05 9:39 AM
Hi Expert,
I need to execute a command in vba for analysis for office to protect and unprotect a book. Does anybody know if it exists? (BPC embedded)
ActiveSheet.Protect -> but for Analysis protect.
Thank you!
Hello,
I have a similar requirement using AFO with BW Integrated Planning input sheets with buttons to trigger planning sequences.
When activating the AFO worksheet protect, some vba commands I use in the Callback_AfterRedisplay module are not allowed any more, such as range.merge and cell.value to add some text in a cell, even with all 13 allow checkboxes ticked in the AfO worksheet lock settings.
The following 3 steps worked for me:
1) Activate AFO Worksheet protection and allow all necessary actions (I ticked all 13 Allow checkboxes)
2) Use the following VBA code in my Callback_AfterRedisplay sub:
- Parameter UserInterfaceOnly allows VBA commands
Worksheets("MySheet").Protect Password:="MyPw", _
DrawingObjects:=False, _
Contents:=True, _
Scenarios:=False, _
UserInterfaceOnly:=True, _
AllowFormattingCells:=True, _
AllowFormattingColumns:=True, _
AllowFormattingRows:=True, _
AllowInsertingColumns:=True, _
AllowInsertingRows:=True, _
AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, _
AllowDeletingRows:=True, _
AllowSorting:=True, _
AllowFiltering:=True, _
AllowUsingPivotTables:=True<br>
3) I had to adjust the standard SAP style SAPEditableDataCell by un-ticking the "Lock" checkbox in the style.
With a de-activated Lock checkbox in the cell property the cell is not locked with the worksheet protection active.
- In the old BEx this was the standard setting. I never had to change it.
In this way I was able to enter data in input-ready cells and use my buttons to trigger planning sequences, while the non-input-ready cells are protected, giving the standard Excel warning message when trying to enter some value.
Kind regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes - one has to use the same password. Interestingly I used a workbook for testing that was protected by AO (with password), then I used Excel functionality/VBA to un-protect (entering the pwd) and protected the sheet again WITHOUT password. Still the AO features did work fine. Nevertheles I would always use the pwd.
Best regards, Gerd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"protected the sheet again WITHOUT password. Still the AO features did work fine."
If the sheet is protected without password then unprotect function will work even with some password 🙂
But after AO will protect the sheet back after finishing update the old password will be restored.
I have spend some time in the past to find the place where the password is stored for EPM Add-In (Not for AO), please read my blog: https://blogs.sap.com/2016/12/01/how-to-get-epm-protection-password/
The same can be done for AO...
Well, this is true. But if you just use the normal workbook/sheet protection then AO cannot perform all actions changing locked cells anymore (e.g. hide totals). If you first lock the workbook with the AO locking described above you can un-lock and re-lock the workbook by VBA. I just tested it and in my case all AO features work. Thus the AO locking is a prerequisite. Best regards, Gerd
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As far as I know there is no special protection API for Analysis tab...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Analysis tab.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please explain what are you using? Analysis tab or EPM tab?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
3 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.