Skip to Content
0

EPM Formatting Through VBA Code (Macros) - SAP BPC 10.0

May 11 at 05:50 AM

51

avatar image

Hello Experts,

In one of our BPC template, number formatting for figures have been done through VBA code (Refresh Macro) as mentioned below which applies to full sheet.

and works proper:


But there is an additional requirement with respect to some of the columns where formatting is different (color changes) for that we have added the below code:


Post refreshing the template it is giving below error with same additional line item:

Any suggestions for code syntax.

Thanks,

Karan

macro-1.jpg (20.3 kB)
macro-2.jpg (22.8 kB)
macro-3.jpg (8.5 kB)
macro-4.jpg (23.1 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Vadim Kalinin May 11 at 06:01 AM
0

Sorry, but Columns return range object having property:

NumberFormat

Not

number_format

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Vadim,

I have tried with your suggestion and template is also getting refresh but there is no effect for this additional line item as it is not getting applied to mentioned particular range.

Thanks,

Karan

macro-5.jpg (24.8 kB)
0

The code:

Range("CQ:DG").NumberFormat = "[Red]#,##0.00;-#,##0.00;- ;"

is absolutely correct and is working in my test macro. It will make positive numbers red (strange idea by the way).

Why it's not working in your code? May be ElseIf is not true...

And have to repeat - it's a bad idea to ask new question without reaction on previous one!

0

Or may be formatting by this line is overwritten by the next code (not shown)!

That's why I always as to post full code in text mode using code button!

0

Hi Vadim,

Your are correct, It was getting overwritten by the latter part of the code.

The same has been rectified and it is working as per requirement.

Thanks,

Karan

0
Vadim Kalinin May 11 at 06:05 AM
0

P.S. Please accept answer on your previous question!

Share
10 |10000 characters needed characters left characters exceeded