ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   VBA: Make Excel the active application (https://www.excelbanter.com/excel-discussion-misc-queries/135436-vba-make-excel-active-application.html)

Gaetan

VBA: Make Excel the active application
 
Hi,

I'm having the following problem... Anyone can help me?

I have VBA code set in Excel that is triggered on Workbook_Open. The code
opens an instance of Word and opens a .doc file to get information from it
and enters this data in the Excel file in which the code resides. It does
that for all .doc files that resides in a specific path.

The problem is the following:
The Excel file is opened from a link in a Word file. Before executing the
full procedure from the Excel file, the code asks the user to confirm he
wants to proceed. This confirmation is not brought to the foreground. Rather,
an alert sound is heard and the user needs to activate Excel to see the
question. Word stays on screen as the active application.

How can I bring Excel to the foreground right after the link is followed in
the Word file?

Thanks for your help!


All times are GMT +1. The time now is 11:58 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com