Showing results for 
Search instead for 
Did you mean: 

EPMPathlink does not invoke workbook_open event in VBA

0 Kudos


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.



Accepted Solutions (0)

Answers (1)

Answers (1)

Active Contributor
0 Kudos

Please read documentation for events in EPM API!

Create new module and insert code like:

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

This will work with EPMPathLink