Open a Workbook require loading SAPBEX.xla file


Copy the below code in PERSONAL.XLSM module of your workbook and then refresh −

Private WithEvents App As Application
Private Sub Workbook_Open()
   Set App = Application
End Sub
Try adding below code, in your module:
Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
   MsgBox "New Workbook: " & Wb.Name
End Sub


Updated on: 14-Feb-2020

93 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements