![]() |
Problem with excel workbook switching
Hi,
I am running an excel macro that fatches data from the database and generats excel reports on multiple sheets. This process sometimes takes about an hour or two. But during this retrieve process, users are not able to open a new excel workbook, or they can not even open aready-opened excel workbooks. Users can not minimize the excel workbook where the process is going on, and can not even switch the already open excel workbooks. Is there anything I should set in the code to allow users to switch the workbook? Thanks in advance. |
Problem with excel workbook switching
Try DoEvents
|
Problem with excel workbook switching
Create a new, hidden instance of Excel to do your processing, leaving the
user free to continue in the existing instance. Dim MyXLApp As excel.application set myxlapp=new excel.application Now direct all your code to this instance. NickHK "King" egroups.com... Hi, I am running an excel macro that fatches data from the database and generats excel reports on multiple sheets. This process sometimes takes about an hour or two. But during this retrieve process, users are not able to open a new excel workbook, or they can not even open aready-opened excel workbooks. Users can not minimize the excel workbook where the process is going on, and can not even switch the already open excel workbooks. Is there anything I should set in the code to allow users to switch the workbook? Thanks in advance. |
All times are GMT +1. The time now is 01:48 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com