From: Mike G - DC on
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

 | 
Pages: 1
Prev: Macros in excel
Next: activate, window activate?