Excel coming to foreground during macro run

GJL

New Member
Joined
Mar 26, 2011
Messages
17
A user is telling me that he can't do other work while my Excel macro is running because it keeps coming to the foreground, interrupting his other work in other applications. In particular, he mentioned MS OneNote.

It doesn't happen in my tests, including with OneNote. I can work in OneOne during the entire run and I never see Excel do more than flash its icon in the Taskbar.

It has a modeless form used to report the status of the run, and it is updated frequently. Also it activates various worksheets in a workbook. But on my computer, I only see it if I deliberately task-switch to Excel; I have never seen it come to the foreground when another application is in the foreground.

Nowhere in the macro do I ever activate an application.

Any ideas on why that might be happening?
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
Not sure, but, as a workaround, you could try setting Application.Visible = False at the beginning of the macro and then setting it back to True again at the end.
 
Upvote 0

Forum statistics

Threads
1,213,552
Messages
6,114,278
Members
448,559
Latest member
MrPJ_Harper

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top