Question

I open a query from SAP BW... I make all the changes I need and I even check the box that says Refresh query every time you open the workbook. The problem is that when I reopen the workbook it's just like a regular Excel, because the SAPBEX.xla file is not loaded anymore. Any ideas on how can I solve this?

I want the workbook updated with the latest data every time I open the workbook. Thanks!

Was it helpful?

Solution

You can use an application event (see Chip Pearson's website).

Put this code in the This Workbook module of your PERSONAL.XLSM (see here).

Private WithEvents App As Application

Private Sub Workbook_Open()
    Set App = Application
End Sub

And in a module:

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
    MsgBox "New Workbook: " & Wb.Name
    'or better check here if this is your workbook and activate the addin
End Sub
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top