Quantcast
Channel: SCN : Unanswered Discussions - SAP BusinessObjects Analysis, edition for Microsoft Office
Viewing all articles
Browse latest Browse all 1183

Standard VBA coding Worksheet_Change or Worksheet_Calculate not working

$
0
0

Hi,

 

I am currently trying to use the standard VBA coding events "Worksheet_Change" or "Worksheet_Calculate" in combination with a SAP Analysis for Office Worksheet.

 

The general idea is that I am using one cell to chapture a variable value which is filled in the prompt. As soon as the user is trying to enter a different value for that variable in the prompt, the event Worksheet_Change or Worksheet_Calculate should jump in and adjust a filter based on the selected new prompt value.

 

Example:

 

1.The user selects category 13000 initially in the prompt.

 

2.The user goes back to the prompt and selects a different category (12000).

 

3.The value for this category is captured in a cell using =SAPGetVariable("DS_1"; "0S_0CM_CDT1_MO_01"; "VALUEASKEY")

 

4.As soon as the category value changed in that cell (here D5), the VBA event Worksheet_Change or Worksheet_Calculate (based on worksheet level) should jump in executing the following code:

 

Public Sub Worksheet_Change(ByVal Target As Range)

    Set Target = ThisWorkbook.Worksheets("SAP_Formula_Customizing").Range("D5")

    If Not Intersect(Target, ThisWorkbook.Worksheets("SAP_Formula_Customizing").Range("D5")) Is Nothing Then

        Call Reset_Filter

    End If

End Sub

 

5. Unfortunately the coding is not accessed after a changed prompt value. It is only accessed when I change the value for cell D5 in the workbook directly or indirectly (meaning by referencing onto a different cell which i then change).


Viewing all articles
Browse latest Browse all 1183

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>