cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

how activate the vba_hook

OliverA41
Active Participant
0 Likes
592

Hello,

I donlowd the vba hook. But now is the question, how I implement the hook in my planning view.

I create a small code in the hook.

Function IBPAfterRefresh()

MsgBox ("Test")

End Function

But if I refresh my PA, nothing happend. So what I have to do furthermore.

I see the note 2421657 but this answered not my question.

Thanks in advanced

Oliver

Accepted Solutions (1)

Accepted Solutions (1)

anna_linden
Advisor
Advisor
0 Likes

Hi,

did you check if the VBA Hooks are enabled via the Global Configuration Parameter ACTIVATE_VBA_HOOKS and / or ACTIVATE_MD_VBA_HOOKS are at least set to OPTIONAL. You can check via the Global Configuration app on the WebUI.

BR Anna

OliverA41
Active Participant
0 Likes

Hello Anna

this is a good point. But I have do this (see screenshot)

Answers (3)

Answers (3)

OliverA41
Active Participant
0 Likes

Hello,

i achieve the next step. I insert the code now only in the IBPVBAHOOKMANAGER. (see screenshot.)

In my planning view is no further call of the function.

But now I have the situation, that for every planning view this vbahook start and the code is running. I want, that the code just run for one planning view.

Regards

Oliver

OliverA41
Active Participant
0 Likes
OliverA41
Active Participant
0 Likes

hello,

in the meanwhile I understand, how i "include" the vbahook in my excel.

see vbahookadd-in.png

But know I have an further issue. I create in the vbahook function afterRefresh a small code

vbahookfunction.png

and in my planning view i called this function in the EpmAfterRefresh modul

vbahookepmaferrefresh.png

but if i refresh now my planning view, follow message are appear which called, that the EPM function will be updated. this process will never end. First I put the left mouse button, it will end.

vbahookmessage.png

What is my mistake? Must I access the function from a other part of the excel sheet as EpmAfterRefresh Modul?

Thanks in advance

Oliver