Fire Code after Preceding Events Run

M

Mike G - DC

I'm trying to add some functionality to a workbook that is updated through an
export process from a web application. Although I cannot access the code
behind the export process, at a bare minimum, I believe the process asks the
user to select a workbook to update, then opens the workbook, loads VBA which
in turn refreshes data, and then formats as needed.

I'd like to activate a specific worksheet (that I've added) within the
workbook once the export process completes. In attempt to do so, I've added a
Before Workbook_Open event (listed below) to the ThisWorkbook module. This
works well when the workbook is opened by itself but is ineffective when
paired with the export process from the web application.

My guess is that the code within the export process runs AFTER my Before
Workbook_Open event and selects another worksheet along the way.

Is there a way to fire code after preceding events have run? That is,
without referencing the specific code/event to wait on? Perhaps there is
another way to accomplish my goal of activating a specific worksheet after
the export process completes.

Private Sub Workbook_Open()
Sheets("Export_Report").Select
End Sub

I’d really appreciate your ideas & insights - mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top