VBA & Business rules.

Post Reply
Radhika
Posts: 97
Joined: Mon Sep 27, 2010 6:49 am
OLAP Product: IBM Cognos TM1
Version: v9.4.1
Excel Version: Microsoft Excel 2003

VBA & Business rules.

Post by Radhika »

Hi All,

What does Application.EnableEvents = False do in VBA?

Can you Describe what the code below is doing?
{ EXCEPT( {[JDE_Account].[CorpCostReport]}, { [JDE_Account].[9022] }) }

Thank you in advance.

Regards,
Radhika
blackhawk
Community Contributor
Posts: 136
Joined: Thu May 29, 2008 2:29 pm

Re: VBA & Business rules.

Post by blackhawk »

Radhika wrote: What does Application.EnableEvents = False do in VBA?
The EnableEvents property enables or disables events. An event is an action, like Change, that occurs in Excel, usually the result of a user action. If an event procedure is defined for that event, Excel will automatically execute that code if EnableEvents is True. If EnableEvents is False, the code is not executed. This is a way of stopping dependent controls that may get you into an infinite loop when something changes programmatically.

Radhika wrote: Can you Describe what the code below is doing?
{ EXCEPT( {[JDE_Account].[CorpCostReport]}, { [JDE_Account].[9022] }) }
This would only make sense is CorpCostReport was a subset. Then, this would use the subset called CorpCostReport and remove account 9022 from the list if it existed.

If CorpCostReport had the following items:
  • 1050
    1070
    3050
    9000
    9022
    9134
    9256
It would become:
  • 1050
    1070
    3050
    9000
    9134
    9256
Radhika
Posts: 97
Joined: Mon Sep 27, 2010 6:49 am
OLAP Product: IBM Cognos TM1
Version: v9.4.1
Excel Version: Microsoft Excel 2003

Re: VBA & Business rules.

Post by Radhika »

Hi Blackhawk,

Thank you very very much for the detailed explanation. :D

Thank you,
Radhika
Post Reply