cancel
Showing results for 
Search instead for 
Did you mean: 

EPMPathlink does not invoke workbook_open event in VBA

0 Kudos

Hi,

I'm trying to capture SAP EPM schedule statistics (which user is opening which EPM report and when?). The way I'm doing this is via application events in Excel VBA (I have followed Chip Pearson's tutorial on this subject).

The VBA code I have implemented does the following:

  1. It captures each time a workbook is opened by the user.
  2. It checks if the workbook is an EPM schedule.
  3. If this is the case then it appends a new line to a .csv file with username, schedule name and timestamp.

VBA code is attached to this question.

I've noticed that, when I open an EPM schedule using EPMPathlink function, the VBA code IS NOT invoked. When I open an EPM schedule using OpenSpecificDocument the VBA code IS invoked (and works as intended).

My question is:

Is there a way to capture the EPMPathlink event?

Many thanks in advance for your input.

Regards,

Erwin

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member186338
Active Contributor
0 Kudos

Please read documentation for events in EPM API!

https://help.sap.com/viewer/ec68e48b18a44a49abb12b8ee8ae306f/10.0.33/en-US/f9b8a4b16faf1014878bae8cb...

Create new module and insert code like:

Public Function AFTER_WORKBOOK_OPEN() As Boolean
ThisWorkbook.Worksheets("Sheet1").Range("A21").Value = CStr(Time())
AFTER_WORKBOOK_OPEN = True
End Function

This will work with EPMPathLink