Skip to Content
Author's profile photo Thomas Sendzik

How to run a VBA after EPM AddIn

Hi,

I had a problem in creating a VBA that is executed everytime a Layout is opened.

While trying the classical “WORKBOOK_OPEN” String I remarked that some of the actions were overwritten by EPM Add-In as the Layout was not ready loaded when the code was executed. The reason for that is, that EPM Add-In functionalities run after the “WORKBOOK_OPEN”.

Gladly a colleague gave me the right tipp:

Insert a SUB in a Module that contains the string “AFTER_REFRESH” instead of “WORKBOOK_OPEN” – and it works fine (thanks P.-J.)

For example:

Sub AFTER_REFRESH()

Application.ScreenUpdating = False
   
‘Autoscroll to Area on Sheet
    Worksheets(“PAC P&L Planning”).Activate
    ActiveWindow.ScrollRow = Range(“G30”).End(xlUp).Row       
Application.ScreenUpdating = True
  
Range(“G30”).Select
  
End Sub

kind regards

Thomas

Assigned Tags

      2 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      good tip, thanks for sharing.

      Author's profile photo David Barre
      David Barre

      Works a treat for formatting.

      Thank you.